function views_oai_pmh_garbage_collect in Views OAI-PMH 7.3
Same name and namespace in other branches
- 6.2 views_oai_pmh.module \views_oai_pmh_garbage_collect()
- 6 views_oai_pmh.module \views_oai_pmh_garbage_collect()
- 7 views_oai_pmh.module \views_oai_pmh_garbage_collect()
- 7.2 views_oai_pmh.module \views_oai_pmh_garbage_collect()
Flush the cache of resumption tokens.
1 call to views_oai_pmh_garbage_collect()
- views_oai_pmh_cron in ./
views_oai_pmh.module - Implements hook_cron().
File
- ./
views_oai_pmh.module, line 53 - The Views OAI-PMH module.
Code
function views_oai_pmh_garbage_collect() {
$cache_flush = time() - VIEWS_OAI_PMH_TOKEN_LIFETIME;
db_delete('cache_views_oai_pmh')
->condition('expire', $cache_flush, '<=')
->execute();
}