public function EntityFieldManager::useCaches

public EntityFieldManager::useCaches($use_caches = FALSE)

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 551

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 = [];
  }
}

© 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!EntityFieldManager.php/function/EntityFieldManager::useCaches/8.1.x