field_info_cache_clear

Versions
7
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

▾ 7 functions call field_info_cache_clear()

field_cache_clear in modules/field/field.module
Clear the field info and field date caches.
field_multilingual_settings_changed in modules/field/field.multilingual.inc
Implements hook_multilingual_settings_changed().
field_purge_field in modules/field/field.crud.inc
Purges a field record from the database.
field_purge_instance in modules/field/field.crud.inc
Purges a field instance record from the database.
field_ui_field_overview_form in modules/field_ui/field_ui.admin.inc
Menu callback; listing of fields for a content type.
hook_multilingual_settings_changed in modules/locale/locale.api.php
Allow modules to react to language settings changes.
image_style_flush in modules/image/image.module
Flush cached media for a style.

Code

modules/field/field.info.inc, line 25

<?php
function field_info_cache_clear() {
  // @todo: Remove this when field_attach_*_bundle() bundle management
  // functions are moved to the entity API.
  entity_info_cache_clear();

  _field_info_collate_types(TRUE);
  drupal_static_reset('field_build_modes');
  _field_info_collate_fields(TRUE);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.