aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-16 15:52:23 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-16 15:52:23 +0000
commit6c73f8d0d2d08c9c58f8ddd77ecb61f39c3735ca (patch)
treee5b5bd7d845ebd711841f8fc75f3be264e2b2928
parentd0980545ba6cd44de6caaacdf32138e79a4a2160 (diff)
downloadelgg-6c73f8d0d2d08c9c58f8ddd77ecb61f39c3735ca.tar.gz
elgg-6c73f8d0d2d08c9c58f8ddd77ecb61f39c3735ca.tar.bz2
A little more flexibility for the simplecache.
git-svn-id: https://code.elgg.org/elgg/trunk@2768 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--engine/start.php4
-rw-r--r--upgrade.php2
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');