EntityManager::useCaches

public EntityManager::useCaches($use_caches = FALSE)

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 462

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);
}
doc_Drupal
2016-10-29 09:07:09
Comments
Leave a Comment

Please login to continue.