This affects the cache_clear_all function:
In drupal's cache.inc:
else {
if ($wildcard) {
if ($cid == '*') {
db_query("DELETE FROM {". $table ."}");
}
else {
db_query("DELETE FROM {". $table ."} WHERE cid LIKE '%s%%'", $cid);
}
}
else {
db_query("DELETE FROM {". $table ."} WHERE cid = '%s'", $cid);
}
}
In cacherouter's code:
else {
if ($wildcard) {
if ($cid == '*') {
$cache->delete('*', $table);
}
else {
$cache->delete($cid . '*', $table);
}
}
else {
$cache->delete($cid, $table);
}
}
As you can see if you do not provide wildcard TRUE, the $cid is treated as the actual key to delete. In cacherouter however the same thing is done when having wildcard TRUE and wildcard FALSE:
$cache->delete('*', $table);
Comments
Comment #1
andypostSuppose $cache->delete('*', $table); same as $cache->flush() which is not flushing temps with timestamp
Comment #2
andypostSo what is difference between $cache->delete(...) and $cache->flush(...) ?
Supose we need only delete method for clearing and flush as garbagecollector
Comment #3
slantview commentedComment #4
slantview commented