function ctools_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.

1 call to ctools_object_cache_clean()
ctools_object_cache_cron in includes/object-cache.cron.inc
@file Contains cron hooks for the object cache tool.

File

includes/object-cache.inc, line 203

Code

function ctools_object_cache_clean($age = NULL) {
  if (empty($age)) {
    // 7 days.
    $age = 86400 * 7;
  }
  db_delete('ctools_object_cache')->condition('updated', REQUEST_TIME - $age, '<')
    ->execute();
}