You are here

public function EntityManager::useCaches in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityManager.php \Drupal\Core\Entity\EntityManager::useCaches()

Disable the use of caches.

Can be used to ensure that uncached plugin definitions are returned, without invalidating all cached information.

This will also remove all local/static caches.

Parameters

bool $use_caches: FALSE to not use any caches.

Overrides CachedDiscoveryInterface::useCaches

File

core/lib/Drupal/Core/Entity/EntityManager.php, line 465
Contains \Drupal\Core\Entity\EntityManager.

Class

EntityManager
Provides a wrapper around many other services relating to entities.

Namespace

Drupal\Core\Entity

Code

public function useCaches($use_caches = FALSE) {
  $this->container
    ->get('entity_type.manager')
    ->useCaches($use_caches);

  // @todo EntityFieldManager is not a plugin manager, and should not co-opt
  //   this method for managing its caches.
  $this->container
    ->get('entity_field.manager')
    ->useCaches($use_caches);
}