aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/cache.php12
-rw-r--r--engine/lib/plugins.php4
2 files changed, 10 insertions, 6 deletions
diff --git a/engine/lib/cache.php b/engine/lib/cache.php
index 75183d23a..cfda26e52 100644
--- a/engine/lib/cache.php
+++ b/engine/lib/cache.php
@@ -26,7 +26,7 @@ function elgg_get_system_cache() {
static $FILE_PATH_CACHE;
if (!$FILE_PATH_CACHE) {
- $FILE_PATH_CACHE = new ElggFileCache($CONFIG->dataroot);
+ $FILE_PATH_CACHE = new ElggFileCache($CONFIG->dataroot . 'system_cache/');
}
return $FILE_PATH_CACHE;
@@ -39,9 +39,13 @@ function elgg_get_system_cache() {
*/
function elgg_reset_system_cache() {
$cache = elgg_get_system_cache();
- $view_types_result = $cache->delete('view_types');
- $views_result = $cache->delete('views');
- return $view_types_result && $views_result;
+
+ $result = true;
+ $cache_types = array('view_paths', 'view_types');
+ foreach ($cache_types as $type) {
+ $result = $result && $cache->delete($type);
+ }
+ return $result;
}
/**
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index bbec52c2e..d9c7b321b 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -302,7 +302,7 @@ function elgg_load_plugins() {
}
// Load view caches if available
- $cached_view_paths = elgg_load_system_cache('views');
+ $cached_view_paths = elgg_load_system_cache('view_paths');
$cached_view_types = elgg_load_system_cache('view_types');
$cached_view_info = is_string($cached_view_paths) && is_string($cached_view_types);
@@ -334,7 +334,7 @@ function elgg_load_plugins() {
// Cache results
if (!$cached_view_info) {
- elgg_save_system_cache('views', serialize($CONFIG->views));
+ elgg_save_system_cache('view_paths', serialize($CONFIG->views));
elgg_save_system_cache('view_types', serialize($CONFIG->view_types));
}