7.x field.module field_cache_clear()

Clear the field info and field data caches.

Related topics

17 calls to field_cache_clear()
DrupalWebTestCase::tearDown in modules/simpletest/drupal_web_test_case.php
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.
FieldAttachStorageTestCase::testFieldAttachSaveMissingData in modules/field/tests/field.test
Tests insert and update with missing or NULL fields.
FieldAttachStorageTestCase::testFieldAttachSaveMissingDataDefaultValue in modules/field/tests/field.test
Test insert with missing or NULL fields, with default value.
FieldFormTestCase::testNestedFieldForm in modules/field/tests/field.test
Tests Field API form integration within a subform.
FieldInfoTestCase::testFieldPrepare in modules/field/tests/field.test
Test that cached field definitions are ready for current runtime context.

... See full list

File

modules/field/field.module, line 744
Attach custom data fields to Drupal entities.

Code

function field_cache_clear() {
  cache_clear_all('*', 'cache_field', TRUE);
  field_info_cache_clear();
}

Comments

Nills’s picture

This function is a weak point of the Drupal. I have 1.1GiB cache_field (many types and many fields) and when I want to create one new type it turns into horror because the Drupal clears the cache_field each time I create a new type and new field - it spend a lot of time and the site goes down.
Is it possible to make it more effective like you did with read bundle fields cache in 7.22 release? Thanks.

kirazan’s picture

Hello, did you foud the solution? I have same issue with my website.

NancyDru’s picture