Lines Matching defs:cache
52 * Caches data into a PSR-16 cache implementation
61 * PSR-16 cache implementation
65 private $cache;
68 * PSR-16 cache implementation
70 * @param CacheInterface $cache
72 public function __construct(CacheInterface $cache)
74 $this->cache = $cache;
78 * Fetches a value from the cache.
85 * @param string $key The unique key of this item in the cache.
88 * @return array|mixed The value of the item from the cache, or $default in case of cache miss.
95 $data = $this->cache->get($key, $default);
105 * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
125 return $this->cache->set($key, $value, $ttl);
129 * Delete an item from the cache by its unique key.
136 * @param string $key The unique cache key of the item to delete.
145 return $this->cache->delete($key);