From 2e7fccaaa481869814745043a774cddc2b77fa94 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 18 Jun 2018 14:58:10 -0700 Subject: [PATCH] (dev/core#174) System::flushCache() - Continue existing behavior aftering fixing prefixes The preceding update to `CRM_Utils_Cache` meant that `CRM_Utils_Cache::singleton()->flush()` (aka `Civi::cache()->flush()`) would flush only the *default* cache. This revision ensures that a general system-flush still hits the same caches. However, we can now define *other* caches which *won't* be hit by system-flush. --- CRM/Utils/System.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index e2d72f530324..9b1fffef0251 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -1416,8 +1416,12 @@ public static function civiExit($status = 0) { public static function flushCache() { // flush out all cache entries so we can reload new data // a bit aggressive, but livable for now - $cache = CRM_Utils_Cache::singleton(); - $cache->flush(); + Civi::cache()->flush(); + Civi::cache('settings')->flush(); + Civi::cache('js_strings')->flush(); + Civi::cache('community_messages')->flush(); + CRM_Extension_System::singleton()->getCache()->flush(); + CRM_Cxn_CiviCxnHttp::singleton()->getCache()->flush(); // also reset the various static memory caches