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();
}
}
}
Please login to continue.