function EntityTypeManager::useCaches

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::useCaches()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::useCaches()
  3. 11.x core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::useCaches()

Overrides DefaultPluginManager::useCaches

File

core/lib/Drupal/Core/Entity/EntityTypeManager.php, line 172

Class

EntityTypeManager
Manages entity type plugin definitions.

Namespace

Drupal\Core\Entity

Code

public function useCaches($use_caches = FALSE) {
    parent::useCaches($use_caches);
    if (!$use_caches) {
        $this->handlers = [];
        $this->container
            ->get('entity.memory_cache')
            ->reset();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.