Total Complexity | 5 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | trait CacheResponse |
||
9 | { |
||
10 | /** |
||
11 | * @var null|CacheStoreImp |
||
12 | */ |
||
13 | protected $cacheStore; |
||
14 | |||
15 | /** |
||
16 | * @return CacheStore|CacheStoreImp |
||
17 | * |
||
18 | * @author duc <[email protected]> |
||
19 | */ |
||
20 | 22 | public function getCacheStore() |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return CacheStore |
||
31 | * |
||
32 | * @author duc <[email protected]> |
||
33 | */ |
||
34 | 19 | public function getDefaultCacheDriver() |
|
35 | { |
||
36 | 19 | return new CacheStore(); |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param CacheStoreImp $cacheStore |
||
41 | * |
||
42 | * @return $this |
||
43 | * |
||
44 | * @author duc <[email protected]> |
||
45 | */ |
||
46 | 3 | public function setCacheStore(CacheStoreImp $cacheStore) |
|
51 | } |
||
52 | |||
53 | /** |
||
54 | * @param string $name |
||
55 | * @param string $ip |
||
56 | * @return string |
||
57 | * |
||
58 | * @author duc <[email protected]> |
||
59 | */ |
||
60 | 15 | public function cacheKey(string $name, string $ip) |
|
65 |