aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--engine/start.php4
2 files changed, 5 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 7defc779f..c89ab2789 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -448,6 +448,8 @@
}
}
+ datalist_set('simplecache_lastupdate',0);
+
}
}
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;