Lines Matching full:cache
45 namespace SimplePie\Cache;
70 protected $cache;
80 * Cache name
87 * Create a new cache object
90 * @param string $name Unique ID for the cache
95 //$this->cache = \flow\simple\cache\Redis::getRedisClientInstance();
96 $parsed = \SimplePie\Cache::parse_URL($location);
105 $this->cache = $redis;
120 * @param NativeRedis $cache
122 public function setRedisClient(NativeRedis $cache)
124 $this->cache = $cache;
128 * Save data to the cache
130 * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
138 $response = $this->cache->set($this->name, serialize($data));
140 $this->cache->expire($this->name, $this->options['expire']);
147 * Retrieve the data saved to the cache
153 $data = $this->cache->get($this->name);
162 * Retrieve the last modified time for the cache
168 $data = $this->cache->get($this->name);
184 $data = $this->cache->get($this->name);
187 $return = $this->cache->set($this->name, $data);
189 return $this->cache->expire($this->name, $this->options['expire']);
198 * Remove the cache
204 return $this->cache->set($this->name, null);
208 class_alias('SimplePie\Cache\Redis', 'SimplePie_Cache_Redis');