| Versionen | |
|---|---|
| drupal7 | field_cache_clear($rebuild_schema = FALSE) |
Clear the cached information; called in several places when field information is changed.
modules/
<?php
function field_cache_clear($rebuild_schema = FALSE) {
cache_clear_all('*', 'cache_field', TRUE);
module_load_include('inc', 'field', 'field.info');
_field_info_collate_types(TRUE);
_field_info_collate_fields(TRUE);
// Refresh the schema to pick up new information.
// TODO : if db storage gets abstracted out, we'll need to revisit how and when
// we refresh the schema...
if ($rebuild_schema) {
$schema = drupal_get_schema(NULL, TRUE);
}
}
?>
Kommentare
Kommentar hinzufügen