// reset any static caching
self::$_cache = NULL;
- // reset any db caching
- $config = CRM_Core_Config::singleton();
- $smartGroupCacheTimeout = CRM_Contact_BAO_GroupContactCache::smartGroupCacheTimeout();
-
$query = "
DELETE
FROM civicrm_acl_cache
WHERE modified_date IS NULL
- OR (TIMESTAMPDIFF(MINUTE, modified_date, NOW()) >= $smartGroupCacheTimeout)
+ OR (modified_date <= %1)
";
- CRM_Core_DAO::singleValueQuery($query);
+ $params = array(1 => array(CRM_Contact_BAO_GroupContactCache::getCacheInvalidDateTime(), 'String'));
+ CRM_Core_DAO::singleValueQuery($query, $params);
// CRM_Core_DAO::singleValueQuery("TRUNCATE TABLE civicrm_acl_contact_cache"); // No, force-commits transaction
// CRM_Core_DAO::singleValueQuery("DELETE FROM civicrm_acl_contact_cache"); // Transaction-safe