function views_object_cache_clean in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 includes/cache.inc \views_object_cache_clean()
Remove all objects in the object cache that are older than the specified age.
Parameters
$age: The minimum age of objects to remove, in seconds. For example, 86400 is one day. Defaults to 7 days.
Related topics
File
Code
function views_object_cache_clean($age = NULL) {
if (empty($age)) {
$age = 86400 * 7;
// 7 days
}
db_query("DELETE FROM {views_object_cache} WHERE updated < %d", time() - $age);
}