aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/cache.php')
-rw-r--r--engine/lib/cache.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/engine/lib/cache.php b/engine/lib/cache.php
index d4cd6b460..c117b9ec9 100644
--- a/engine/lib/cache.php
+++ b/engine/lib/cache.php
@@ -35,17 +35,11 @@ function elgg_get_system_cache() {
/**
* Reset the system cache by deleting the caches
*
- * @return bool
+ * @return void
*/
function elgg_reset_system_cache() {
$cache = elgg_get_system_cache();
-
- $result = true;
- $cache_types = array('view_locations', 'view_types');
- foreach ($cache_types as $type) {
- $result = $result && $cache->delete($type);
- }
- return $result;
+ $cache->clear();
}
/**
@@ -446,6 +440,12 @@ function _elgg_cache_init() {
elgg_save_system_cache('view_locations', serialize($CONFIG->views->locations));
elgg_save_system_cache('view_types', serialize($CONFIG->view_types));
}
+
+ if ($CONFIG->system_cache_enabled && !$CONFIG->i18n_loaded_from_cache) {
+ foreach ($CONFIG->translations as $lang => $map) {
+ elgg_save_system_cache("$lang.php", serialize($map));
+ }
+ }
}
elgg_register_event_handler('ready', 'system', '_elgg_cache_init');