Same name and namespace in other branches
- 4.7.x includes/bootstrap.inc \cache_clear_all()
- 5.x includes/cache.inc \cache_clear_all()
- 6.x includes/cache.inc \cache_clear_all()
- 6.x includes/cache-install.inc \cache_clear_all()
- 7.x includes/cache.inc \cache_clear_all()
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.
27 calls to cache_clear_all()
- block_admin in modules/
block.module - Menu callback; displays the block overview page.
- 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.
File
- includes/
bootstrap.inc, line 244 - Functions that need to be loaded on every Drupal request.
Code
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);
}
}
}