function field_info_cache_clear

Clears the field info cache without clearing the field data cache.

This is useful when deleted fields or instances are purged. We need to remove the purged records, but no actual field data items are affected.

Related topics

17 calls to field_info_cache_clear()
FieldOverview::form in drupal/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
Overrides Drupal\field_ui\OverviewBase::form().
field_bundle_settings in drupal/core/modules/field/field.module
Gets or sets administratively defined bundle settings.
field_cache_clear in drupal/core/modules/field/field.module
Clears the field info and field data caches.
field_language_delete in drupal/core/modules/field/field.multilingual.inc
Implements hook_language_delete().
field_language_insert in drupal/core/modules/field/field.multilingual.inc
Implements hook_language_insert().

... See full list

File

drupal/core/modules/field/field.info.inc, line 54
Field Info API, providing information about available fields and field types.

Code

function field_info_cache_clear() {
  drupal_static_reset('field_view_mode_settings');
  drupal_static_reset('field_available_languages');

  // @todo: Remove this when field_attach_*_bundle() bundle management
  // functions are moved to the entity API.
  entity_info_cache_clear();
  _field_info_collate_types_reset();
  _field_info_field_cache()
    ->flush();
}