/** * Clears the cache for the specified function or the entire cache if a * function is not specified. * * @param string $funcName * The function name to clear from the cache. */ public static function clear($funcName = null) { if ($funcName === null) { self::$cache = array(); } if (array_key_exists($funcName, self::$cache)) { unset(self::$cache[$funcName]); } }
public static function setCache($bool) { self::$cache = (bool) $bool; }
function cache_parser($id, $file, $mode) { if ($id) { $this->page = $id; } $this->file = $file; $this->mode = $mode; parent::cache($file . $_SERVER['HTTP_HOST'] . $_SERVER['SERVER_PORT'], '.' . $mode); }
private static function initRedis() { self::$cache = new Redis(); self::$cache->connect(self::$redisServer, self::$redisPort); self::$cacheType = 'redis'; }
public function cache_ghissues_api($requestURL) { parent::cache($requestURL, '.ghissues'); $this->etag = substr($this->cache, 0, -9) . '.etag'; }