From 62a356615c690e4020ef143332270ee57525b2c4 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 25 Jan 2012 19:31:01 -0500 Subject: plugins use language cache and cache is cleared properly --- engine/lib/cache.php | 10 ++-------- engine/lib/plugins.php | 3 +++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/engine/lib/cache.php b/engine/lib/cache.php index c7e0ae31c..b329c58ec 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_paths', 'view_types'); - foreach ($cache_types as $type) { - $result = $result && $cache->delete($type); - } - return $result; + $cache->clear(); } /** diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 07b21d276..488387ba7 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -303,6 +303,9 @@ function elgg_load_plugins() { if (elgg_get_config('system_cache_loaded')) { $start_flags = $start_flags & ~ELGG_PLUGIN_REGISTER_VIEWS; + if ($CONFIG->i18n_loaded_from_cache) { + $start_flags = $start_flags & ~ELGG_PLUGIN_REGISTER_LANGUAGES; + } } $return = true; -- cgit v1.2.3