composer package updates
[openemr.git] / vendor / illuminate / contracts / Cache / Repository.php
blob7820fbf7af89b34b12c444a57760f1b00e6cd4eb
1 <?php
3 namespace Illuminate\Contracts\Cache;
5 use Closure;
6 use Psr\SimpleCache\CacheInterface;
8 interface Repository extends CacheInterface
10 /**
11 * Determine if an item exists in the cache.
13 * @param string $key
14 * @return bool
16 public function has($key);
18 /**
19 * Retrieve an item from the cache by key.
21 * @param string $key
22 * @param mixed $default
23 * @return mixed
25 public function get($key, $default = null);
27 /**
28 * Retrieve an item from the cache and delete it.
30 * @param string $key
31 * @param mixed $default
32 * @return mixed
34 public function pull($key, $default = null);
36 /**
37 * Store an item in the cache.
39 * @param string $key
40 * @param mixed $value
41 * @param \DateTimeInterface|\DateInterval|float|int $minutes
42 * @return void
44 public function put($key, $value, $minutes);
46 /**
47 * Store an item in the cache if the key does not exist.
49 * @param string $key
50 * @param mixed $value
51 * @param \DateTimeInterface|\DateInterval|float|int $minutes
52 * @return bool
54 public function add($key, $value, $minutes);
56 /**
57 * Increment the value of an item in the cache.
59 * @param string $key
60 * @param mixed $value
61 * @return int|bool
63 public function increment($key, $value = 1);
65 /**
66 * Decrement the value of an item in the cache.
68 * @param string $key
69 * @param mixed $value
70 * @return int|bool
72 public function decrement($key, $value = 1);
74 /**
75 * Store an item in the cache indefinitely.
77 * @param string $key
78 * @param mixed $value
79 * @return void
81 public function forever($key, $value);
83 /**
84 * Get an item from the cache, or store the default value.
86 * @param string $key
87 * @param \DateTimeInterface|\DateInterval|float|int $minutes
88 * @param \Closure $callback
89 * @return mixed
91 public function remember($key, $minutes, Closure $callback);
93 /**
94 * Get an item from the cache, or store the default value forever.
96 * @param string $key
97 * @param \Closure $callback
98 * @return mixed
100 public function sear($key, Closure $callback);
103 * Get an item from the cache, or store the default value forever.
105 * @param string $key
106 * @param \Closure $callback
107 * @return mixed
109 public function rememberForever($key, Closure $callback);
112 * Remove an item from the cache.
114 * @param string $key
115 * @return bool
117 public function forget($key);
120 * Get the cache store implementation.
122 * @return \Illuminate\Contracts\Cache\Store
124 public function getStore();