aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/cache.php4
-rw-r--r--install/ElggInstaller.php3
2 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/cache.php b/engine/lib/cache.php
index 2832a35b9..32f36ff03 100644
--- a/engine/lib/cache.php
+++ b/engine/lib/cache.php
@@ -243,9 +243,7 @@ function elgg_regenerate_simplecache($viewtype = NULL) {
* @since 1.8.0
*/
function elgg_is_simplecache_enabled() {
- global $CONFIG;
-
- if ($CONFIG->simplecache_enabled) {
+ if (elgg_get_config('simplecache_enabled')) {
return true;
}
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index fc0eff0ab..3fdd3afdb 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -1303,6 +1303,7 @@ class ElggInstaller {
datalist_set('dataroot', $submissionVars['dataroot']);
datalist_set('default_site', $site->getGUID());
datalist_set('version', get_version());
+ datalist_set('simplecache_enabled', 1);
// new installations have run all the upgrades
$upgrades = elgg_get_upgrade_files($submissionVars['path'] . 'engine/lib/upgrades/');
@@ -1320,6 +1321,8 @@ class ElggInstaller {
$dataroot = datalist_get('dataroot');
$cache = new ElggFileCache($dataroot);
$cache->delete('view_paths');
+ elgg_invalidate_simplecache();
+ elgg_regenerate_simplecache();
return TRUE;
}