cache = $cache; $this->prefix = $prefix; } /** * {@inheritdoc} */ public function get($key) { if ($item = $this->cache->get($this->prefix . $key)) { return $item->data; } } /** * {@inheritdoc} */ public function set($key, $value, $ttl = 0) { $ttl = (int) $ttl; $ttl = $ttl === 0 ? CacheBackendInterface::CACHE_PERMANENT : time() + $ttl; $this->cache->set($this->prefix . $key, $value, $ttl); } /** * {@inheritdoc} */ public function remove($key) { $this->cache->delete($this->prefix . $key); } }