public function FieldInfo::flush

7.x field.info.class.inc public FieldInfo::flush()

Clears the "static" and persistent caches.

File

drupal-7.x/modules/field/field.info.class.inc, line 97

Class

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

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_clear_all('field_info:', 'cache_field', TRUE);
}