function _d8cache_entity_get_list_cache_tags in Drupal 8 Cache Backport 7
Get cache tags for an entity type.
2 calls to _d8cache_entity_get_list_cache_tags()
- d8cache_entity_view in includes/
entity.inc - Implements hook_entity_view().
- _d8cache_entity_invalidate_cache_tags in includes/
entity.inc - Invalidate entity specific cache tags.
File
- includes/
entity.inc, line 108 - Entity functions and hooks for the D8 caching system backport.
Code
function _d8cache_entity_get_list_cache_tags($entity_type, $entity = NULL) {
$return = array(
$entity_type . '_list',
);
if (!empty($entity)) {
list(, , $entity_bundle) = entity_extract_ids($entity_type, $entity);
$return[] = $entity_type . '_' . $entity_bundle . '_list';
}
return $return;
}