public function FieldInfo::flush

Clears the "static" and persistent caches.

File

drupal/core/modules/field/lib/Drupal/field/FieldInfo.php, line 101

Class

FieldInfo
Provides field and instance definitions for the current runtime environment.

Namespace

Drupal\field

Code

public function flush() {
  $this->fieldMap = NULL;
  $this->fieldsById = array();
  $this->fieldIdsByName = array();
  $this->loadedAllFields = FALSE;
  $this->unknownFields = array();
  $this->bundleInstances = array();
  $this->loadedAllInstances = FALSE;
  $this->emptyBundles = array();
  $this->bundleExtraFields = array();
  cache('field')
    ->deleteTags(array(
    'field_info' => TRUE,
  ));
}