Lines Matching refs:data
51 * Caches data to memcache
57 * prefixed with `sp_` and data will expire after 3600 seconds
92 * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
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
118 public function save($data)
120 if ($data instanceof \SimplePie\SimplePie) {
121 $data = $data->data;
123 return $this->cache->set($this->name, serialize($data), MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']);
127 * Retrieve the data saved to the cache
129 * @return array Data for SimplePie::$data
133 $data = $this->cache->get($this->name);
135 if ($data !== false) {
136 return unserialize($data);
148 $data = $this->cache->get($this->name);
150 if ($data !== false) {
165 $data = $this->cache->get($this->name);
167 if ($data !== false) {
168 return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']);