aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/start.php')
-rw-r--r--engine/start.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/start.php b/engine/start.php
index 2960c938c..a77da9caa 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -200,10 +200,12 @@
$oldview = $CONFIG->view;
}
+ $lastupdate = datalist_get('simplecache_lastupdate');
$lastcached = datalist_get('simplecache_'.$oldview);
- if ($lastcached < (time() - (86400 * 7))) {
+ if ($lastupdate == 0 || $lastcached < $lastupdate) {
elgg_view_regenerate_simplecache();
$lastcached = time();
+ datalist_set('simplecache_lastupdate',$lastcached);
datalist_set('simplecache_'.$oldview,$lastcached);
}
$CONFIG->lastcache = $lastcached;