Skip to content

Commit

Permalink
(dev/core#174) System::flushCache() - Continue existing behavior afte…
Browse files Browse the repository at this point in the history
…ring 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.
  • Loading branch information
totten committed Jun 18, 2018
1 parent f5e6269 commit 2e7fcca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CRM/Utils/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2e7fcca

Please sign in to comment.