W3cubDocs

/Drupal 8

public function 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 460

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);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityManager.php/function/EntityManager::useCaches/8.1.x