CRM_Core_BAO_Cache::deleteGroup('contact fields');
//CRM-8559, cache navigation do not respect locale if it is changed, so reseting cache.
- CRM_Core_BAO_Cache::deleteGroup('navigation');
+ Civi::cache('navigation')->flush();
+ // reset ACL and System caches
+ CRM_Core_BAO_Cache::resetCaches();
// we do this only to initialize monetary decimal point and thousand separator
$config = CRM_Core_Config::singleton();
$groups = [
// Core
'contact fields',
- 'navigation',
'custom data',
// Universe
//CRM-8559, cache navigation do not respect locale if it is changed, so reseting cache.
// Ed: This doesn't sound good.
- // CRM_Core_BAO_Cache::deleteGroup('navigation');
+ // Civi::cache('navigation')->flush();
}
else {
$requestLocale = NULL;
$config = CRM_Core_Config::singleton();
// check if we can retrieve from database cache
- $navigations = CRM_Core_BAO_Cache::getItem('navigation', $cacheKeyString);
+ $navigations = Civi::cache('navigation')->get($cacheKeyString);
if (!$navigations) {
$domainID = CRM_Core_Config::domainID();
$navigations = [];
self::_getNavigationLabel($pidGroups[''], $navigations);
- CRM_Core_BAO_Cache::setItem($navigations, 'navigation', $cacheKeyString);
+ Civi::cache('navigation')->set($cacheKeyString, $navigations);
}
return $navigations;
}
$ser = serialize($newKey);
$query = "UPDATE civicrm_setting SET value = '$ser' WHERE name='navigation' AND contact_id IS NOT NULL";
CRM_Core_DAO::executeQuery($query);
- CRM_Core_BAO_Cache::deleteGroup('navigation');
+ Civi::cache('navigation')->flush();
+ // reset ACL and System caches
+ CRM_Core_BAO_Cache::resetCaches();
}
else {
// before inserting check if contact id exists in db
Civi::cache('js_strings')->flush();
Civi::cache('community_messages')->flush();
Civi::cache('groups')->flush();
+ Civi::cache('navigation')->flush();
CRM_Extension_System::singleton()->getCache()->flush();
CRM_Cxn_CiviCxnHttp::singleton()->getCache()->flush();
}
'session' => 'CiviCRM Session',
'long' => 'long',
'groups' => 'contact groups',
+ 'navigation' => 'navigation',
];
foreach ($basicCaches as $cacheSvc => $cacheGrp) {
$definitionParams = [