rss MDL-25319 replicating my optimization made to forum rss in glossary rss and database rss

This commit is contained in:
Andrew Davis
2010-11-19 06:56:23 +00:00
parent e3c21e8c13
commit c02f338e5e
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -34,8 +34,9 @@
if (file_exists($cachedfilepath)) {
$cachedfilelastmodified = filemtime($cachedfilepath);
}
if (data_rss_newstuff($data, $cachedfilelastmodified)) {
//if the cache is more than 60 seconds old and there's new stuff
$dontrecheckcutoff = time()-60;
if ( $dontrecheckcutoff > $cachedfilelastmodified && data_rss_newstuff($data, $cachedfilelastmodified)) {
require_once($CFG->dirroot . '/mod/data/lib.php');
// Get the first field in the list (a hack for now until we have a selector)