function field_cache_clear

Clears the field info and field data caches.

Related topics

18 calls to field_cache_clear()
DatetimeFieldTest::testDatelistWidget in drupal/core/modules/datetime/lib/Drupal/datetime/Tests/DatetimeFieldTest.php
Tests Date List Widget functionality.
entity_reference_create_instance in drupal/core/modules/entity_reference/entity_reference.module
Creates an instance of a entity reference field on the specified bundle.
Field::delete in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
Implements \Drupal\Core\Entity\EntityInterface::delete().
Field::saveNew in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
Saves a new field definition.
Field::saveUpdated in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
Saves an updated field definition.

... See full list

File

drupal/core/modules/field/field.module, line 654
Attach custom data fields to Drupal entities.

Code

function field_cache_clear() {
  cache('field')
    ->deleteAll();
  field_info_cache_clear();
}