diff options
-rw-r--r-- | engine/lib/elgglib.php | 2 | ||||
-rw-r--r-- | engine/start.php | 4 | ||||
-rw-r--r-- | upgrade.php | 2 |
3 files changed, 6 insertions, 2 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;
diff --git a/upgrade.php b/upgrade.php index d4aa1bbea..9e8ec5d74 100644 --- a/upgrade.php +++ b/upgrade.php @@ -21,7 +21,7 @@ if (version_upgrade_check()) { version_upgrade(); }
- datalist_set('elgg_view_regenerate_simplecache',0);
+ datalist_set('simplecache_lastupdate',0);
} else {
global $CONFIG;
echo elgg_view('settings/upgrading');
|