cache_clear_all

  1. drupal
    1. 5
    2. 6
    3. 6 cache-install.inc
    4. 8
    5. 7
Versions
5 – 6 cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE)
8 – 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 bin $bin is emptied.

▾ 76 functions call cache_clear_all()

aggregator_aggregator_parse in modules/aggregator/aggregator.parser.inc
Implements hook_aggregator_parse().
BlockCacheTestCase::testCachePerRole in modules/block/block.test
Test DRUPAL_CACHE_PER_ROLE.
block_add_block_form_submit in modules/block/block.admin.inc
Form submission handler for the add block form.
block_admin_configure_submit in modules/block/block.admin.inc
Form submission handler for the block configuration form.
block_admin_display_form_submit in modules/block/block.admin.inc
Form submission handler for the main blocks administration form.
block_custom_block_delete_submit in modules/block/block.admin.inc
Form submission handler for the custom block deletion form.
CacheClearCase::testClearArray in modules/simpletest/tests/cache.test
Test clearing using an array.
CacheClearCase::testClearCid in modules/simpletest/tests/cache.test
Test clearing using a cid.
CacheClearCase::testClearWildcard in modules/simpletest/tests/cache.test
Test clearing using wildcard.
CacheGetMultipleUnitTest::testCacheMultiple in modules/simpletest/tests/cache.test
Test cache_get_multiple().
CacheIsEmptyCase::testIsEmpty in modules/simpletest/tests/cache.test
Test clearing using a cid.
CacheTestCase::generalWipe in modules/simpletest/tests/cache.test
Perform the general wipe.
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_form_submit in modules/comment/comment.module
Process comment form submissions; prepare the comment, store it, and set a redirection target.
comment_multiple_delete_confirm_submit in modules/comment/comment.admin.inc
Process comment_multiple_delete_confirm form submissions.
comment_save_action in modules/comment/comment.module
Saves a comment.
DrupalWebTestCase::refreshVariables in modules/simpletest/drupal_web_test_case.php
Refresh the in-memory set of variables. Useful after a page request is made that changes a variable in a different thread.
drupal_flush_all_caches in includes/common.inc
Flush all cached data on the site.
drupal_get_complete_schema in includes/bootstrap.inc
Get the whole database schema.
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.
entity_info_cache_clear in includes/common.inc
Resets the cached information about entity types.
field_attach_delete in modules/field/field.attach.inc
Delete field data for an existing entity. This deletes all revisions of field data for the entity.
field_attach_update in modules/field/field.attach.inc
Save field data for an existing entity.
field_cache_clear in modules/field/field.module
Clear the field info and field data caches.
filter_formats_reset in modules/filter/filter.module
Resets text format caches.
filter_format_disable in modules/filter/filter.module
Disable a text format.
filter_format_save in modules/filter/filter.module
Save a text format object to the database.
forum_form_submit in modules/forum/forum.admin.inc
Process forum form and container form submissions.
forum_update_7003 in modules/forum/forum.install
Rename field to 'taxonomy_forums'.
hook_image_style_flush in modules/image/image.api.php
Respond to image style flushing.
image_example_style_flush in examples/image_example/image_example.module
Implements hook_image_style_flush().
image_style_flush in modules/image/image.module
Flush cached media for a style.
locale in modules/locale/locale.module
Provides interface translation services.
LocaleTranslationFunctionalTest::testJavaScriptTranslation in modules/locale/locale.test
locale_languages_delete_form_submit in modules/locale/locale.admin.inc
Process language deletion submissions.
locale_languages_overview_form_submit in modules/locale/locale.admin.inc
Process language overview form submissions, updating existing languages.
locale_translate_delete_form_submit in modules/locale/locale.admin.inc
Process string deletion submissions.
locale_translate_edit_form_submit in modules/locale/locale.admin.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.
ModuleUnitTest::testModuleImplements in modules/simpletest/tests/module.test
Test module_implements() caching.
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_form_submit in modules/node/node.pages.inc
node_type_cache_reset in modules/node/node.module
Clears the node type cache.
PathTestCase::testPathCache in modules/path/path.test
Test the path cache.
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.
simpletest_clean_environment in modules/simpletest/simpletest.module
Remove all temporary database tables and directories.
system_clear_page_cache_submit in modules/system/system.admin.inc
Submit callback; clear the page cache.
system_cron in modules/system/system.module
Implements hook_cron().
system_list_reset in includes/module.inc
Reset all system_list() caches.
system_theme_settings_submit in modules/system/system.admin.inc
Process system_theme_settings form submissions.
taxonomy_form_term_submit in modules/taxonomy/taxonomy.admin.inc
Submit handler to insert or update a term.
taxonomy_term_confirm_delete_submit in modules/taxonomy/taxonomy.admin.inc
Submit handler to delete a term after confirmation.
taxonomy_vocabulary_confirm_delete_submit in modules/taxonomy/taxonomy.admin.inc
Submit handler to delete a vocabulary after confirmation.
taxonomy_vocabulary_delete in modules/taxonomy/taxonomy.module
Delete a vocabulary.
taxonomy_vocabulary_save in modules/taxonomy/taxonomy.module
Saves a vocabulary.
update_info_page in ./update.php
UpgradePathTestCase::variable_set in modules/simpletest/tests/upgrade/upgrade.test
Specialized variable_set() that works even if the child site is not upgraded.
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
Unsets a persistent variable.
variable_set in includes/bootstrap.inc
Sets a persistent variable.
_field_info_collate_fields in modules/field/field.info.inc
Collates all information on existing fields and instances.
_field_info_collate_types in modules/field/field.info.inc
Collates 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.
_user_cancel in modules/user/user.module
Last batch processing step for cancelling a user account.

Code

includes/cache.inc, line 159

<?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);
}
?>