You are here

public function EntityFieldManager::useCaches in Zircon Profile 8

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

Disable the use of caches.

@todo Remove in https://www.drupal.org/node/2549143.

Parameters

bool $use_caches: FALSE to not use any caches.

Overrides EntityFieldManagerInterface::useCaches

Deprecated

in Drupal 8.0.0, will be removed before Drupal 9.0.0.

File

core/lib/Drupal/Core/Entity/EntityFieldManager.php, line 556
Contains \Drupal\Core\Entity\EntityFieldManager.

Class

EntityFieldManager
Manages the discovery of entity fields.

Namespace

Drupal\Core\Entity

Code

public function useCaches($use_caches = FALSE) {
  $this->useCaches = $use_caches;
  if (!$use_caches) {
    $this->fieldDefinitions = [];
    $this->baseFieldDefinitions = [];
    $this->fieldStorageDefinitions = [];
  }
}