Lines Matching defs:cache
71 protected $cache;
88 * Create a new cache object
91 * @param string $name Unique ID for the cache
108 $this->cache = new NativeMemcache();
109 $this->cache->addServer($this->options['host'], (int) $this->options['port']);
113 * Save data to the cache
115 * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
123 return $this->cache->set($this->name, serialize($data), MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']);
127 * Retrieve the data saved to the cache
133 $data = $this->cache->get($this->name);
142 * Retrieve the last modified time for the cache
148 $data = $this->cache->get($this->name);
165 $data = $this->cache->get($this->name);
168 return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']);
175 * Remove the cache
181 return $this->cache->delete($this->name, 0);