function cache_clear_all

7.x cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE)

Expires data from the cache.

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


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

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

$wildcard: If 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 '*', the entire cache bin is emptied.

77 calls to cache_clear_all()
aggregator_aggregator_parse in drupal/modules/aggregator/
Implements hook_aggregator_parse().
BlockCacheTestCase::testCachePerRole in drupal/modules/block/block.test
block_add_block_form_submit in drupal/modules/block/
Form submission handler for block_add_block_form().
block_admin_configure_submit in drupal/modules/block/
Form submission handler for block_admin_configure().
block_admin_display_form_submit in drupal/modules/block/
Form submission handler for block_admin_display_form().

... See full list

2 string references to 'cache_clear_all'
menu_cache_clear in drupal/includes/
Clears the cached cached data for a single named menu.
_menu_clear_page_cache in drupal/includes/
Clears the page and block caches at most twice per page load.


drupal/includes/, line 153
Functions and interfaces for cache handling.


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 _cache_get_object($bin)->clear($cid, $wildcard);