You are here

function ad_cache_file_hook in Advertisement 5.2

Same name and namespace in other branches
  1. 6.3 cache/file/ad_cache_file.inc \ad_cache_file_hook()
  2. 6.2 cache/file/ad_cache_file.inc \ad_cache_file_hook()
  3. 7 cache/file/ad_cache_file.inc \ad_cache_file_hook()

Return hook defintion.

File

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

Code

function ad_cache_file_hook($hook) {
  $cache = ad_cache_file_cache();
  if (isset($cache["hook_{$hook}"]) && is_array($cache["hook_{$hook}"])) {
    return $cache["hook_{$hook}"];
  }
  else {
    _debug_echo("File cache: hook '{$hook}' not found.");
  }
  return array();
}