Lines Matching defs:cache
62 private $cache;
64 public function __construct(Base $cache)
66 $this->cache = $cache;
70 * Fetches a value from the cache.
77 * @param string $key The unique key of this item in the cache.
80 * @return array|mixed The value of the item from the cache, or $default in case of cache miss.
87 $data = $this->cache->load();
93 // ignore data if internal cache expiration time is not set
98 // ignore data if internal cache expiration time is expired
103 // remove internal cache expiration time
110 * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
134 // place internal cache expiration time
137 return $this->cache->save($value);
141 * Delete an item from the cache by its unique key.
148 * @param string $key The unique cache key of the item to delete.
157 return $this->cache->unlink();