cache_clear_all

Versions
4.6 – 4.7
cache_clear_all($cid = NULL, $wildcard = false)
5 – 6
cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE)
7
cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE)

Expire data from the cache.

If called without arguments, expirable entries will be cleared from the cache_page and cache_block bins.

Parameters

$cid If set, the cache ID to delete. Otherwise, all cache entries that can expire are deleted.

$bin If set, the bin $bin to delete from. Mandatory argument if $cid is set.

$wildcard If $wildcard is TRUE, cache IDs starting with $cid are deleted in addition to the exact cache ID specified by $cid. If $wildcard is TRUE and $cid is '*' then the entire table $table is emptied.

▾ 70 functions call cache_clear_all()

aggregator_aggregator_parse in modules/aggregator/aggregator.parser.inc
Implement hook_aggregator_parse().
block_add_block_form_submit in modules/block/block.admin.inc
Save the new custom block.
block_admin_configure_submit in modules/block/block.admin.inc
block_admin_display_form_submit in modules/block/block.admin.inc
Process main blocks administration form submissions.
block_custom_block_delete_submit in modules/block/block.admin.inc
Deletion of custom blocks.
cache_clear_all in includes/cache.inc
Expire data from the cache.
comment_admin_overview_submit in modules/comment/comment.admin.inc
Process comment_admin_overview form submissions.
comment_confirm_delete_submit in modules/comment/comment.admin.inc
Process comment_confirm_delete form submissions.
comment_multiple_delete_confirm_submit in modules/comment/comment.admin.inc
Process comment_multiple_delete_confirm form submissions.
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.
drupal_flush_all_caches in includes/common.inc
Flush all cached data on the site.
drupal_process_form in includes/form.inc
Processes a form submission.
drupal_theme_rebuild in includes/theme.inc
Force the system to rebuild the theme registry; this should be called when modules are added to the system, or when a dynamic system needs to add more theme hooks.
field_attach_delete in modules/field/field.attach.inc
Delete field data for an existing object. This deletes all revisions of field data for the object.
field_attach_insert in modules/field/field.attach.inc
Save field data for a new object.
field_attach_update in modules/field/field.attach.inc
Save field data for an existing object.
field_cache_clear in modules/field/field.module
Clear the field info and field date caches.
field_info_cache_clear in modules/field/field.info.inc
Clear the field info cache without clearing the field data cache.
field_test_entity_info_translatable in modules/field/tests/field_test.module
Helper function to enable entity translations.
filter_admin_configure_submit in modules/filter/filter.admin.inc
Form submit handler for text format filter configuration form.
filter_admin_order_submit in modules/filter/filter.admin.inc
Process filter order configuration form submission.
filter_cron in modules/filter/filter.module
Implement hook_cron().
filter_format_delete in modules/filter/filter.module
Delete a text format.
filter_format_save in modules/filter/filter.module
Save a text format object to the database.
hook_image_style_flush in modules/image/image.api.php
Respond to image style flushing.
image_style_flush in modules/image/image.module
Flush cached media for a style.
locale in modules/locale/locale.module
Provides interface translation services.
locale_languages_delete_form_submit in includes/locale.inc
Process language deletion submissions.
locale_languages_overview_form_submit in includes/locale.inc
Process language overview form submissions, updating existing languages.
locale_translate_delete_form_submit in includes/locale.inc
Process string deletion submissions.
locale_translate_edit_form_submit in includes/locale.inc
Process string editing form submissions.
menu_cache_clear in includes/menu.inc
Clears the cached cached data for a single named menu.
menu_cache_clear_all in includes/menu.inc
Clears all cached menu data. This should be called any time broad changes might have been made to the router items or menu links.
module_implements in includes/module.inc
Determine which modules are implementing a hook.
node_access_rebuild in modules/node/node.module
Rebuild the node access database. This is occasionally needed by modules that make system-wide changes to access levels.
node_admin_nodes_submit in modules/node/node.admin.inc
Process node_admin_nodes form submissions.
node_delete_multiple in modules/node/node.module
Delete multiple nodes.
node_save in modules/node/node.module
Save changes to a node or add a new node.
poll_vote in modules/poll/poll.module
Submit handler for processing a vote.
profile_admin_overview_submit in modules/profile/profile.admin.inc
Submit handler to update changed profile field weights and categories.
profile_field_delete_submit in modules/profile/profile.admin.inc
Process a field delete form submission.
profile_field_form_submit in modules/profile/profile.admin.inc
Process profile_field_form submissions.
rdf_mapping_save in modules/rdf/rdf.module
Saves an RDF mapping to the database.
rdf_modules_installed in modules/rdf/rdf.module
Implements hook_modules_installed().
scaffolding_example_uninstall in developer/examples/scaffolding_example/scaffolding_example.install
Implementation of hook_uninstall().
simpletest_clean_environment in modules/simpletest/simpletest.module
Remove all temporary database tables and directories.
simpletest_run_tests in modules/simpletest/simpletest.module
Actually runs tests.
system_cron in modules/system/system.module
Implement hook_cron().
system_list_reset in includes/module.inc
Reset all system_list() caches.
system_modules_submit in modules/system/system.admin.inc
Submit callback; handles modules form submission.
system_settings_form_submit in modules/system/system.module
Execute the system_settings_form.
system_site_information_settings_submit in modules/system/system.admin.inc
Form submit handler for the site-information form.
system_theme_settings_submit in modules/system/system.admin.inc
Process system_theme_settings form submissions.
system_update_6050 in modules/system/system.install
Clear any menu router blobs stored in the cache table.
taxonomy_term_delete in modules/taxonomy/taxonomy.module
Delete a term.
taxonomy_term_save in modules/taxonomy/taxonomy.module
Save a term object to the database.
taxonomy_vocabulary_delete in modules/taxonomy/taxonomy.module
Delete a vocabulary.
taxonomy_vocabulary_save in modules/taxonomy/taxonomy.module
Save a vocabulary given a vocabulary object.
update_info_page in ./update.php
user_admin_permissions_submit in modules/user/user.admin.inc
Save permissions selected on the administer permissions page.
user_profile_form_submit in modules/user/user.pages.inc
Submit function for the user account and profile editing form.
variable_del in includes/bootstrap.inc
Unset a persistent variable.
variable_set in includes/bootstrap.inc
Set a persistent variable.
_field_info_collate_fields in modules/field/field.info.inc
Collate all information on existing fields and instances.
_field_info_collate_types in modules/field/field.info.inc
Collate all information on field types, widget types and related structures.
_locale_import_po in includes/locale.inc
Parses Gettext Portable Object file information and inserts into database
_menu_clear_page_cache in includes/menu.inc
Helper function to clear the page and block caches at most twice per page load.
_node_access_rebuild_batch_finished in modules/node/node.module
Post-processing for node_access_rebuild_batch.
_taxonomy_clean_field_cache in modules/taxonomy/taxonomy.module
Helper function that clears field cache when terms are updated or deleted
_user_cancel in modules/user/user.module
Last batch processing step for cancelling a user account.

Code

includes/cache.inc, line 157

<?php
function cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE) {
  if (!isset($cid) && !isset($bin)) {
    // Clear the block cache first, so stale data will
    // not end up in the page cache.
    if (module_exists('block')) {
      cache_clear_all(NULL, 'cache_block');
    }
    cache_clear_all(NULL, 'cache_page');
    return;
  }
  return _cache_get_object($bin)->clear($cid, $wildcard);
}
?>
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.