Factory.php
2 years ago
Lock.php
2 years ago
LockProvider.php
2 years ago
LockTimeoutException.php
2 years ago
Repository.php
3 weeks ago
Store.php
2 years ago
Store.php
85 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWPSCOPED\Illuminate\Contracts\Cache; |
| 4 | |
| 5 | /** @internal */ |
| 6 | interface Store |
| 7 | { |
| 8 | /** |
| 9 | * Retrieve an item from the cache by key. |
| 10 | * |
| 11 | * @param string|array $key |
| 12 | * @return mixed |
| 13 | */ |
| 14 | public function get($key); |
| 15 | /** |
| 16 | * Retrieve multiple items from the cache by key. |
| 17 | * |
| 18 | * Items not found in the cache will have a null value. |
| 19 | * |
| 20 | * @param array $keys |
| 21 | * @return array |
| 22 | */ |
| 23 | public function many(array $keys); |
| 24 | /** |
| 25 | * Store an item in the cache for a given number of seconds. |
| 26 | * |
| 27 | * @param string $key |
| 28 | * @param mixed $value |
| 29 | * @param int $seconds |
| 30 | * @return bool |
| 31 | */ |
| 32 | public function put($key, $value, $seconds); |
| 33 | /** |
| 34 | * Store multiple items in the cache for a given number of seconds. |
| 35 | * |
| 36 | * @param array $values |
| 37 | * @param int $seconds |
| 38 | * @return bool |
| 39 | */ |
| 40 | public function putMany(array $values, $seconds); |
| 41 | /** |
| 42 | * Increment the value of an item in the cache. |
| 43 | * |
| 44 | * @param string $key |
| 45 | * @param mixed $value |
| 46 | * @return int|bool |
| 47 | */ |
| 48 | public function increment($key, $value = 1); |
| 49 | /** |
| 50 | * Decrement the value of an item in the cache. |
| 51 | * |
| 52 | * @param string $key |
| 53 | * @param mixed $value |
| 54 | * @return int|bool |
| 55 | */ |
| 56 | public function decrement($key, $value = 1); |
| 57 | /** |
| 58 | * Store an item in the cache indefinitely. |
| 59 | * |
| 60 | * @param string $key |
| 61 | * @param mixed $value |
| 62 | * @return bool |
| 63 | */ |
| 64 | public function forever($key, $value); |
| 65 | /** |
| 66 | * Remove an item from the cache. |
| 67 | * |
| 68 | * @param string $key |
| 69 | * @return bool |
| 70 | */ |
| 71 | public function forget($key); |
| 72 | /** |
| 73 | * Remove all items from the cache. |
| 74 | * |
| 75 | * @return bool |
| 76 | */ |
| 77 | public function flush(); |
| 78 | /** |
| 79 | * Get the cache key prefix. |
| 80 | * |
| 81 | * @return string |
| 82 | */ |
| 83 | public function getPrefix(); |
| 84 | } |
| 85 |