Resets the cached information about entity types.
function entity_info_cache_clear() {
drupal_static_reset('entity_get_view_modes');
drupal_static_reset('entity_get_bundles');
// Clear all languages.
Drupal::entityManager()
->clearCachedDefinitions();
}