entity_render_cache_clear()
Clears the entity render cache for all entity types.
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(); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!entity.inc/function/entity_render_cache_clear/8.1.x