aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/cache.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-01-21 13:03:47 -0500
committerCash Costello <cash.costello@gmail.com>2012-01-21 13:03:47 -0500
commitb466d3e188a001f8d7ede1afbf3927c6dbdeae15 (patch)
tree2a94a7b24561623894d2783156e826cee6cbd1ac /engine/lib/cache.php
parent19a6962c819dc33a0967dcef56154f6930b52287 (diff)
downloadelgg-b466d3e188a001f8d7ede1afbf3927c6dbdeae15.tar.gz
elgg-b466d3e188a001f8d7ede1afbf3927c6dbdeae15.tar.bz2
better location for system cache in data directory
Diffstat (limited to 'engine/lib/cache.php')
-rw-r--r--engine/lib/cache.php12
1 files changed, 8 insertions, 4 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;
}
/**