3 namespace Illuminate\Contracts\Cache
;
6 use Psr\SimpleCache\CacheInterface
;
8 interface Repository
extends CacheInterface
11 * Determine if an item exists in the cache.
16 public function has($key);
19 * Retrieve an item from the cache by key.
22 * @param mixed $default
25 public function get($key, $default = null);
28 * Retrieve an item from the cache and delete it.
31 * @param mixed $default
34 public function pull($key, $default = null);
37 * Store an item in the cache.
41 * @param \DateTimeInterface|\DateInterval|float|int $minutes
44 public function put($key, $value, $minutes);
47 * Store an item in the cache if the key does not exist.
51 * @param \DateTimeInterface|\DateInterval|float|int $minutes
54 public function add($key, $value, $minutes);
57 * Increment the value of an item in the cache.
63 public function increment($key, $value = 1);
66 * Decrement the value of an item in the cache.
72 public function decrement($key, $value = 1);
75 * Store an item in the cache indefinitely.
81 public function forever($key, $value);
84 * Get an item from the cache, or store the default value.
87 * @param \DateTimeInterface|\DateInterval|float|int $minutes
88 * @param \Closure $callback
91 public function remember($key, $minutes, Closure
$callback);
94 * Get an item from the cache, or store the default value forever.
97 * @param \Closure $callback
100 public function sear($key, Closure
$callback);
103 * Get an item from the cache, or store the default value forever.
106 * @param \Closure $callback
109 public function rememberForever($key, Closure
$callback);
112 * Remove an item from the cache.
117 public function forget($key);
120 * Get the cache store implementation.
122 * @return \Illuminate\Contracts\Cache\Store
124 public function getStore();