summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/object-cache.cron.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/object-cache.cron.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/object-cache.cron.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/object-cache.cron.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/object-cache.cron.inc
new file mode 100644
index 0000000..99f2276
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/object-cache.cron.inc
@@ -0,0 +1,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();
+ }
+}