summaryrefslogtreecommitdiffstats
path: root/includes/object-cache.cron.inc
blob: 99f2276ca708222a23d490747746d020a26fd98c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

/**
 * @file
 * Contains cron hooks for the object cache tool.
 *
 * We use this to clean up old object caches.
 */

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