function HTMLPurifier_DefinitionCache_Drupal::cleanup in HTML Purifier 5
Same name and namespace in other branches
- 6.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::cleanup()
- 6 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::cleanup()
- 7.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::cleanup()
- 7 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::cleanup()
File
- ./
HTMLPurifier_DefinitionCache_Drupal.php, line 82
Class
- HTMLPurifier_DefinitionCache_Drupal
- Cache handler that stores all data in drupals builtin cache
Code
function cleanup($config) {
$res = db_query("SELECT cid FROM {cache} WHERE cid LIKE '%s%%'", 'htmlpurifier:');
while ($row = db_fetch_object($res)) {
$key = substr($row->cid, 13);
// 13 == strlen('htmlpurifier:')
if ($this
->isOld($key, $config)) {
cache_clear_all($row->cid, 'cache');
}
}
}