You are here

function ad_cache_file_cache in Advertisement 5.2

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

Keep a copy of the cache in a static.

8 calls to ad_cache_file_cache()
ad_cache_file_close in cache/file/ad_cache_file.inc
Close the cache file and write updated cache to disk.
ad_cache_file_display_ad in cache/file/ad_cache_file.inc
Display a given advertisement.
ad_cache_file_get_cache in cache/file/ad_cache_file.inc
Return the cache structure.
ad_cache_file_hook in cache/file/ad_cache_file.inc
Return hook defintion.
ad_cache_file_id in cache/file/ad_cache_file.inc
Return an array of aids to choose an advertisement from.

... See full list

File

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

Code

function ad_cache_file_cache($update = array()) {
  static $cache = array();
  if (!empty($update)) {
    $cache = $update;
  }
  return $cache;
}