*/
public static function setIsActive($id, $is_active) {
Civi::cache('fields')->flush();
- // also reset ACL Cache
- CRM_ACL_BAO_Cache::resetCache();
- // also reset memory cache if any
- CRM_Utils_System::flushCache();
+ // reset ACL and system caches.
+ CRM_Core_BAO_Cache::resetCaches();
return CRM_Core_DAO::setFieldValue('CRM_ACL_DAO_ACL', $id, 'is_active', $is_active);
}
public function postProcess() {
// note this also resets any ACL cache
Civi::cache('fields')->flush();
+ // reset ACL and system caches.
+ CRM_Core_BAO_Cache::resetCaches();
if ($this->_action & CRM_Core_Action::DELETE) {
CRM_ACL_BAO_ACL::del($this->_id);
public static function setIsActive($id, $is_active) {
// reset the cache
Civi::cache('fields')->flush();
+ // reset ACL and system caches.
+ CRM_Core_BAO_Cache::resetCaches();
if (!$is_active) {
CRM_Core_BAO_UFField::setUFFieldStatus($id, $is_active);
// Reset cache for custom fields
Civi::cache('fields')->flush();
+ // reset ACL and system caches.
+ CRM_Core_BAO_Cache::resetCaches();
CRM_Core_Session::setStatus(ts('Input type of custom field \'%1\' has been successfully changed to \'%2\'.',
[1 => $this->_values['label'], 2 => $dstHtmlType]
// reset the cache
Civi::cache('fields')->flush();
+ // reset ACL and system caches.
+ CRM_Core_BAO_Cache::resetCaches();
if ($this->_action & CRM_Core_Action::UPDATE) {
CRM_Core_Session::setStatus(ts('Your custom field set \'%1 \' has been saved.', [1 => $group->title]), ts('Saved'), 'success');