object-cache.cron.inc 345 B

12345678910111213141516
  1. <?php
  2. /**
  3. * @file
  4. * Contains cron hooks for the object cache tool.
  5. *
  6. * We use this to clean up old object caches.
  7. */
  8. function ctools_object_cache_cron() {
  9. if (variable_get('ctools_last_cron', 0) < time() - 86400) {
  10. variable_set('ctools_last_cron', time());
  11. ctools_include('object-cache');
  12. ctools_object_cache_clean();
  13. }
  14. }