PluginProbe
Independent Analytics – WordPress Analytics Plugin / 2.10.1
Independent Analytics – WordPress Analytics Plugin v2.10.1
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 All 120 releases
independent-analytics / vendor / matomo / device-detector / Cache / LaravelCache.php
LaravelCache.php
53 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 use IAWPSCOPED\Illuminate\Support\Facades\Cache;
14 /** @internal */
15 class LaravelCache implements CacheInterface
16 {
17 /**
18 * @inheritDoc
19 */
20 public function fetch(string $id)
21 {
22 return Cache::get($id);
23 }
24 /**
25 * @inheritDoc
26 */
27 public function contains(string $id) : bool
28 {
29 return Cache::has($id);
30 }
31 /**
32 * @inheritDoc
33 */
34 public function save(string $id, $data, int $lifeTime = 0) : bool
35 {
36 return Cache::put($id, $data, \func_num_args() < 3 ? null : $lifeTime);
37 }
38 /**
39 * @inheritDoc
40 */
41 public function delete(string $id) : bool
42 {
43 return Cache::forget($id);
44 }
45 /**
46 * @inheritDoc
47 */
48 public function flushAll() : bool
49 {
50 return Cache::flush();
51 }
52 }
53