By voleger on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Introduced in version:
8.7.0
Issue links:
Description:
entity_render_cache_clear() is deprecated in Drupal 8.0.x and will be removed before Drupal 9.0.0. Instead, use \Drupal\Core\Entity\EntityViewBuilderInterface::resetCache() on the required entity types. i.e.:
$entity_manager = \Drupal::entityTypeManager();
foreach ($entity_manager->getDefinitions() as $entity_type => $info) {
if ($entity_manager->hasHandler($entity_type, 'view_builder')) {
$entity_manager->getViewBuilder($entity_type)->resetCache();
}
}
Or invalidate specific cache tags. See https://www.drupal.org/docs/8/api/cache-api/cache-tags.
Impacts:
Module developers