field_info_cache_clear

function field_info_cache_clear

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

File

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(TRUE);
  _field_info_field_cache()->flush();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.info.inc/function/field_info_cache_clear/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部