Commit 1d2db443 authored by Dries's avatar Dries
Browse files

- Patch #570218 by yched: viewing 'Manage fields' page clears field data cache.

parent 95e95bfb
...@@ -870,7 +870,7 @@ function field_purge_instance($instance) { ...@@ -870,7 +870,7 @@ function field_purge_instance($instance) {
module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_purge_instance', $instance); module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_purge_instance', $instance);
// Clear the cache. // Clear the cache.
_field_info_cache_clear(); field_info_cache_clear();
// Invoke external hooks after the cache is cleared for API consistency. // Invoke external hooks after the cache is cleared for API consistency.
module_invoke_all('field_purge_instance', $instance); module_invoke_all('field_purge_instance', $instance);
...@@ -899,7 +899,7 @@ function field_purge_field($field) { ...@@ -899,7 +899,7 @@ function field_purge_field($field) {
module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_purge_field', $field); module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_purge_field', $field);
// Clear the cache. // Clear the cache.
_field_info_cache_clear(); field_info_cache_clear();
// Invoke external hooks after the cache is cleared for API consistency. // Invoke external hooks after the cache is cleared for API consistency.
module_invoke_all('field_purge_field', $field); module_invoke_all('field_purge_field', $field);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* need to remove the purged records, but no actual field data items * need to remove the purged records, but no actual field data items
* are affected. * are affected.
*/ */
function _field_info_cache_clear() { function field_info_cache_clear() {
_field_info_collate_types(TRUE); _field_info_collate_types(TRUE);
drupal_static_reset('field_build_modes'); drupal_static_reset('field_build_modes');
_field_info_collate_fields(TRUE); _field_info_collate_fields(TRUE);
......
...@@ -421,7 +421,7 @@ function field_cache_clear($rebuild_schema = FALSE) { ...@@ -421,7 +421,7 @@ function field_cache_clear($rebuild_schema = FALSE) {
cache_clear_all('*', 'cache_field', TRUE); cache_clear_all('*', 'cache_field', TRUE);
module_load_include('inc', 'field', 'field.info'); module_load_include('inc', 'field', 'field.info');
_field_info_cache_clear(); field_info_cache_clear();
// Refresh the schema to pick up new information. // Refresh the schema to pick up new information.
// TODO : if db storage gets abstracted out, we'll need to revisit how and when // TODO : if db storage gets abstracted out, we'll need to revisit how and when
......
...@@ -73,7 +73,7 @@ function field_ui_field_overview_form(&$form_state, $obj_type, $bundle) { ...@@ -73,7 +73,7 @@ function field_ui_field_overview_form(&$form_state, $obj_type, $bundle) {
// When displaying the form, make sure the list of fields is up-to-date. // When displaying the form, make sure the list of fields is up-to-date.
if (empty($form_state['post'])) { if (empty($form_state['post'])) {
field_cache_clear(); field_info_cache_clear();
} }
// Gather bundle information. // Gather bundle information.
...@@ -542,8 +542,6 @@ function field_ui_field_overview_form_submit($form, &$form_state) { ...@@ -542,8 +542,6 @@ function field_ui_field_overview_form_submit($form, &$form_state) {
unset($_REQUEST['destination']); unset($_REQUEST['destination']);
$form_state['redirect'] = field_ui_get_destinations($destinations); $form_state['redirect'] = field_ui_get_destinations($destinations);
} }
field_cache_clear();
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment