Mercurial > hg > rr-repo
diff sites/all/modules/ctools/includes/object-cache.cron.inc @ 0:ff03f76ab3fe
initial version
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Wed, 21 Aug 2013 18:51:11 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sites/all/modules/ctools/includes/object-cache.cron.inc Wed Aug 21 18:51:11 2013 +0100 @@ -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(); + } +}