CacheInterface.php
2 years ago
DoctrineBridge.php
2 years ago
LaravelCache.php
2 years ago
PSR16Bridge.php
2 years ago
PSR6Bridge.php
2 years ago
StaticCache.php
2 years ago
CacheInterface.php
47 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Device Detector - The Universal Device Detection library for parsing User Agents |
| 5 | * |
| 6 | * @link https://matomo.org |
| 7 | * |
| 8 | * @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later |
| 9 | */ |
| 10 | declare (strict_types=1); |
| 11 | namespace IAWPSCOPED\DeviceDetector\Cache; |
| 12 | |
| 13 | /** @internal */ |
| 14 | interface CacheInterface |
| 15 | { |
| 16 | /** |
| 17 | * @param string $id |
| 18 | * |
| 19 | * @return mixed |
| 20 | */ |
| 21 | public function fetch(string $id); |
| 22 | /** |
| 23 | * @param string $id |
| 24 | * |
| 25 | * @return bool |
| 26 | */ |
| 27 | public function contains(string $id) : bool; |
| 28 | /** |
| 29 | * @param string $id |
| 30 | * @param mixed $data |
| 31 | * @param int $lifeTime |
| 32 | * |
| 33 | * @return bool |
| 34 | */ |
| 35 | public function save(string $id, $data, int $lifeTime = 0) : bool; |
| 36 | /** |
| 37 | * @param string $id |
| 38 | * |
| 39 | * @return bool |
| 40 | */ |
| 41 | public function delete(string $id) : bool; |
| 42 | /** |
| 43 | * @return bool |
| 44 | */ |
| 45 | public function flushAll() : bool; |
| 46 | } |
| 47 |