entity_render_cache_clear

entity_render_cache_clear()

Clears the entity render cache for all entity types.

File

core/includes/entity.inc, line 15
Entity API for handling entities like nodes or users.

Code

function entity_render_cache_clear() {
  $entity_manager = Drupal::entityManager();
  foreach ($entity_manager->getDefinitions() as $entity_type => $info) {
    if ($entity_manager->hasHandler($entity_type, 'view_builder')) {
      $entity_manager->getViewBuilder($entity_type)->resetCache();
    }
  }
}
doc_Drupal
2016-10-29 09:09:16
Comments
Leave a Comment

Please login to continue.