You are here

function ad_cache_file_cron in Advertisement 6.3

Same name and namespace in other branches
  1. 6.2 cache/file/ad_cache_file.module \ad_cache_file_cron()
  2. 7 cache/file/ad_cache_file.module \ad_cache_file_cron()

Implementation of hook_adcacheapi().

File

cache/file/ad_cache_file.module, line 33
A plug in for the ad.module, providing a file cache mechanism for improved performance when displaying ads.

Code

function ad_cache_file_cron() {
  ad_cache_file_open();
  $cache = ad_cache_file_cache();
  $last_sync = isset($cache['last_sync']) ? $cache['last_sync'] : 0;
  $lifetime = isset($cache['lifetime']) ? $cache['lifetime'] : 0;
  if ($last_sync < time() - $lifetime) {
    ad_cache_file_build();
  }
}