1 | <?php |
||
11 | class Cache implements CacheContract |
||
12 | { |
||
13 | /** |
||
14 | * @var RepositoryContract |
||
15 | */ |
||
16 | protected $repository; |
||
17 | |||
18 | /** |
||
19 | * @var LaravelCache |
||
20 | */ |
||
21 | protected $cache; |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | protected $skipCache = false; |
||
27 | |||
28 | /** |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $refreshCache = false; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $key; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | protected $lifetime; |
||
42 | |||
43 | public function __construct(RepositoryContract $repository, LaravelCache $cache) |
||
48 | 6 | ||
49 | 6 | public function __call($method, $params) |
|
81 | 1 | ||
82 | protected function generateKey($method, $params) |
||
88 | |||
89 | public function skipCache($status = true) |
||
95 | |||
96 | public function refreshCache() |
||
102 | 1 | ||
103 | public function cacheKey($name) |
||
109 | |||
110 | 1 | public function cacheLifetime($minutes) |
|
116 | } |
||
117 |