You are here

function entitycache_entity_delete in Entity cache 7

Implements hook_entity_delete().

File

./entitycache.module, line 87
Allows for caching of core entities.

Code

function entitycache_entity_delete($entity, $type) {
  $info = entity_get_info($type);
  list($id) = entity_extract_ids($type, $entity);
  if (!empty($info['entity cache'])) {
    cache_clear_all($id, 'cache_entity_' . $type);
  }
}