Change record status: 
Project: 
Introduced in branch: 
8.0.x
Introduced in version: 
8.7.0
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