You are here

function ctools_object_cache_cron in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 includes/object-cache.cron.inc \ctools_object_cache_cron()

@file Contains cron hooks for the object cache tool.

We use this to clean up old object caches.

File

includes/object-cache.cron.inc, line 10
Contains cron hooks for the object cache tool.

Code

function ctools_object_cache_cron() {
  if (variable_get('ctools_last_cron', 0) < time() - 86400) {
    variable_set('ctools_last_cron', time());
    ctools_include('object-cache');
    ctools_object_cache_clean();
  }
}