Stores information about a asset collection against
a cache identifier.
@param string $cacheKey Cache identifier.
@param array $cacheInfo List of asset files.
@return bool Successful
421118
protected function putCache($cacheKey, array $cacheInfo)
    {
        $cacheKey = 'combiner.'.$cacheKey;

        if (Cache::has($cacheKey)) {
            return false;
        }

        $this->putCacheIndex($cacheKey);
        Cache::forever($cacheKey, base64_encode(serialize($cacheInfo)));
        return true;
    }
621161
public function clear($commandKey, $cacheKey)
    {
        if ($this->exists($commandKey, $cacheKey)) {
            unset($this->cachedResults[$commandKey][$cacheKey]);
        }
    }
652637
protected function setToCache($cacheKey, $value, $ttl = null)
    {
        // Seralize as JSON to ensure array etc can be stored
        $value = Convert::raw2json($value);

        return $this->getCache()->set($cacheKey, $value, $ttl);
    }
913826
public function clear(CacheKey $key) {
		if (isset ( $this->elements [$key->getModule()] [$key->getProperty()] )) {
			unset ( $this->elements [$key->getModule()] [$key->getProperty()] );
			$this->changed = true;
		}
	}
586038
public static function clear($key)
    {
        $that = new static($key);

        if ($that->isCached()) {

            $deletionSuccess = unlink($that->filePath());
            
            if(!$deletionSuccess) {
                throw new CacheException(sprintf("Could not delete file '%s'", $this->filePath()));
            }
        }
    }
1061627
public function isInCache($key)
  {
    $value = $this->memcache->get($this->buildMKey($key));
    if ($value) {
      return true;
    }
    return false;
  }
258011
public function hasItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        return $this->cache->contains($cacheId);
    }
1068573
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $has_key = file_exists($this->file($key));

//        $this->Logger->debug("Cache contains {$key}? " . ($has_key) ? 'TRUE' : 'FALSE');

        return $has_key;
    }
743996
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $has_key = false;

        $fetchMethod = $this->apcFuncPrefix.'_fetch';
        $fetchMethod($this->key($key), $has_key);

        // $this->Logger->debug("Cache contains {$key}? " . (($has_key) ? 'TRUE' : 'FALSE'));

        return $has_key;
    }
1041194
public function getCacheFile($cacheKey)
    {
        do_action("before_theme_get_cache_file", $cacheKey);

        $filename = md5($_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "-" . $cacheKey);

        do_action("after_theme_get_cache_file", $filename);

        return $this->cachePath . $filename;
    }
437985
public function retrieve($cacheKey)
    {
        if ($this->has($cacheKey)) {
            return $this->cache()->get($cacheKey);
        }

        return false;
    }
517972
public function loadCache($cacheKey)
    {
        if (!isset($this->localCache[$cacheKey])) {
            $data = $this->cache->load($cacheKey);

            if ($data) {
                $data = unserialize($data);
            }

            $this->localCache[$cacheKey] = $data;
        }

        return $this->localCache[$cacheKey];
    }
798082
public static function GetCache($CacheName, $CacheKey) {
      if ($CacheName != 'locale') return;
      
      if (!array_key_exists($CacheName,self::$Caches)) 
         self::PrepareCache($CacheName);
         
      if (self::$Caches[$CacheName]['mode'] == 'flat') 
         $Target = &self::$Caches[$CacheName]['cache'][$CacheName];
      else
         $Target = &self::$Caches[$CacheName]['cache'];
      $Target = (array)$Target;
      
      if (array_key_exists($CacheKey,$Target))
         return $Target[$CacheKey];
         
      return NULL;
   }
565939
public function hasItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        return isset($this->map[$cacheId]);
    }
852603
public function get($cacheKey)
    {
        // TODO: Refactor for strict types!
        $path = $this->resolvePath($cacheKey, false);
        if (file_exists($path)) {
            return file_get_contents($path);
        }

        return null;
    }
510907
public function purgeCachedFiles($cacheKey) {
        // Get directory and filename
        list($directory, $filename) = $this->getDirectoryAndFilenameFromKey($cacheKey);

        // Remove the directory
        passthru("rm -rf " . $directory . "/" . $filename);

    }
582138
public function cacheFile($cacheKey, $fileContents) {

        // Get directory and filename
        list($directory, $filename) = $this->getDirectoryAndFilenameFromKey($cacheKey);

        // Make the cache directory
        if (!file_exists($directory)) mkdir($directory, 0777, true);

        // Save the file
        file_put_contents($directory . "/" . $filename, $fileContents);

    }