You are here

function hook_entitycache_pre_cache_get_alter in Entity cache 7

Act on entity ids before loading from cache.

Parameters

array $ids: Array with entity ids.

array $conditions: Array with conditions how to load the entities.

string $entity_type:

1 invocation of hook_entitycache_pre_cache_get_alter()
EntityCacheControllerHelper::entityCacheGet in includes/entitycache.entitycachecontrollerhelper.inc

File

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

Code

function hook_entitycache_pre_cache_get_alter(&$ids, &$conditions, $entity_type) {
  if ($entity_type == 'foo' && some_condition()) {

    // Do not load any entities for 'foo' from cache while some_condition() is
    // active.
    $ids = array();
  }
}