You are here

function d8cache_entity_load in Drupal 8 Cache Backport 7

Implements hook_entity_load().

1 call to d8cache_entity_load()
d8cache_entitycache_load in includes/entity.inc
Implements hook_entitycache_load().
1 string reference to 'd8cache_entity_load'
d8cache_disable_cache_tags_for_entity_load in includes/entity.inc
Temporarily disable adding of cache tags during entity loading.

File

includes/entity.inc, line 26
Entity functions and hooks for the D8 caching system backport.

Code

function d8cache_entity_load($entities, $entity_type) {
  $disabled =& drupal_static(__FUNCTION__, FALSE);
  if ($disabled) {
    return;
  }
  $tags = array();
  foreach ($entities as $entity_id => $entity) {
    $tags[] = $entity_type . ':' . $entity_id;
  }
  drupal_add_cache_tags($tags);
}