You are here

function hook_entitycache_pre_reset_cache_alter in Entity cache 7

Act on the ids to clear before resetting the cache.

Set $ids to FALSE to disable the cache clearing.

Parameters

array|NULL $ids: Array with entity ids or NULL for clearing the whole cache.

$entity_type:

1 invocation of hook_entitycache_pre_reset_cache_alter()
EntityCacheControllerHelper::resetEntityCache in includes/entitycache.entitycachecontrollerhelper.inc

File

./entitycache.api.php, line 119
Hooks provided by the Entity cache module.

Code

function hook_entitycache_pre_reset_cache_alter(&$ids, $entity_type) {
  if (some_other_condition()) {

    // Disable cache clearing while some_other_condition() is active.
    $ids = FALSE;
  }
}