| 5 cache.inc | cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE) |
| 6 cache-install.inc | cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE) |
| 6 cache.inc | cache_clear_all($cid = NULL, |
| 7 cache.inc | cache_clear_all( |
| 8 cache.inc | cache_clear_all() |
Expires 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 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()
2 string references to 'cache_clear_all'
File
- includes/
cache.inc, line 166 - Functions and interfaces for cache handling.
Code
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
Comments
You may be looking for this...
drupal_flush_all_caches:
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_fl...
$bin == cache table
The $bin is the name of the particular database cache table. So, for example:
cache_clear_all('field:node:' . $node->nid, 'cache_field');