function 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

includes/cache.inc, line 284

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);
}