Lines Matching defs:cache
71 protected $cache;
88 * Create a new cache object
91 * @param string $name Unique ID for the cache
96 //$this->cache = \flow\simple\cache\Redis::getRedisClientInstance();
106 $this->cache = $redis;
121 * @param NativeRedis $cache
123 public function setRedisClient(NativeRedis $cache)
125 $this->cache = $cache;
129 * Save data to the cache
131 * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
139 $response = $this->cache->set($this->name, serialize($data));
141 $this->cache->expire($this->name, $this->options['expire']);
148 * Retrieve the data saved to the cache
154 $data = $this->cache->get($this->name);
163 * Retrieve the last modified time for the cache
169 $data = $this->cache->get($this->name);
185 $data = $this->cache->get($this->name);
188 $return = $this->cache->set($this->name, $data);
190 return $this->cache->expire($this->name, $this->options['expire']);
199 * Remove the cache
205 return $this->cache->set($this->name, null);