| 1 | <?php |
||
| 15 | class Wincache extends Storage |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * The cache key from the cache configuration file. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $key; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param $key |
||
| 26 | */ |
||
| 27 | public function __construct($key) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Retrieve an item from the cache storage. |
||
| 34 | * |
||
| 35 | * @param string $key |
||
| 36 | * |
||
| 37 | * @return mixed |
||
| 38 | */ |
||
| 39 | protected function retrieve($key) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Write an item to the cache for a given number of minutes. |
||
| 50 | * |
||
| 51 | * <code> |
||
| 52 | * // Put an item in the cache for 15 minutes |
||
| 53 | * Cache::put('name', 'Robin', 15); |
||
| 54 | * </code> |
||
| 55 | * |
||
| 56 | * @param string $key |
||
| 57 | * @param mixed $value |
||
| 58 | * @param int $minutes |
||
| 59 | * |
||
| 60 | * @return bool|void |
||
| 61 | */ |
||
| 62 | public function put($key, $value, $minutes) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Write an item to the cache that lasts forever. |
||
| 69 | * |
||
| 70 | * @param $key |
||
| 71 | * @param $value |
||
| 72 | * |
||
| 73 | * @return bool|void |
||
| 74 | */ |
||
| 75 | public function forever($key, $value) |
||
| 79 | |||
| 80 | /** |
||
| 81 | * Delete an item from the cache. |
||
| 82 | * |
||
| 83 | * @param string $key |
||
| 84 | * |
||
| 85 | * @return bool|void |
||
| 86 | */ |
||
| 87 | public function forget($key) |
||
| 91 | } |
||
| 92 |