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.

Parameters

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

$wildcard If set to true, the $cid is treated as a substring to match rather than a complete ID.

▾ 31 functions call cache_clear_all()

aggregator_refresh in modules/aggregator.module
Checks a news feed for new items.
block_admin in modules/block.module
Menu callback; displays the block overview page.
block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.
block_box_delete in modules/block.module
Menu callback; confirm and delete custom blocks.
comment_delete in modules/comment.module
Menu callback; delete a comment.
comment_post in modules/comment.module
filter_admin_delete in modules/filter.module
Menu callback; confirm deletion of a format.
filter_admin_filters_save in modules/filter.module
Save enabled/disabled status for filters in a format.
filter_admin_order_save in modules/filter.module
Save the weights of filters in a format.
locale in modules/locale.module
Provides interface translation services
locale_admin_manage in modules/locale.module
Page handler for the language management screen
locale_admin_manage_delete_screen in modules/locale.module
User interface for the language deletion confirmation screen
menu_rebuild in includes/menu.inc
Populate the database representation of the menu.
node_delete in modules/node.module
Ask for confirmation, and delete the node.
node_save in modules/node.module
Save a node object into the database.
profile_admin_add in modules/profile.module
Menu callback; adds a new field to all user profiles.
profile_admin_delete in modules/profile.module
Menu callback; deletes a field from all user profiles.
profile_admin_edit in modules/profile.module
Menu callback; displays the profile field editing form.
system_listing_save in modules/system.module
system_settings_save in modules/system.module
taxonomy_del_term in modules/taxonomy.module
taxonomy_del_vocabulary in modules/taxonomy.module
taxonomy_save_term in modules/taxonomy.module
taxonomy_save_vocabulary in modules/taxonomy.module
throttle_exit in modules/throttle.module
Implementation of hook_exit().
update_113 in database/updates.inc
user_admin_perm in modules/user.module
Menu callback: administer permissions.
user_edit in modules/user.module
variable_del in includes/bootstrap.inc
Unset a persistent variable.
variable_set in includes/bootstrap.inc
Set a persistent variable.
_locale_import_po in includes/locale.inc
Parses Gettext Portable Object file information and inserts into database

Code

includes/bootstrap.inc, line 244

<?php
function cache_clear_all($cid = NULL, $wildcard = false) {
  if (empty($cid)) {
    db_query("DELETE FROM {cache} WHERE expire != %d AND expire < %d", CACHE_PERMANENT, time());
  }
  else {
    if ($wildcard) {
      db_query("DELETE FROM {cache} WHERE cid LIKE '%%%s%%'", $cid);
    }
    else {
      db_query("DELETE FROM {cache} WHERE cid = '%s'", $cid);
    }
  }
}
?>
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.