| Total Complexity | 1 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | trait EasyCache |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Call this method to cache the result of the method in next call. |
||
| 14 | * $class->cache()->get(1) will cache the result of $class->get(1); |
||
| 15 | * |
||
| 16 | * @param int|null $ttl if null, will use the ttl in config file, |
||
| 17 | * if not specified in config file, then 3600 |
||
| 18 | * @param string|null $key if null, will serialize the instance class |
||
| 19 | * name, method name and parameters as key. Has |
||
| 20 | * to specify key if parameters have closure |
||
| 21 | * @param string|null $store laravel cache store |
||
| 22 | * |
||
| 23 | * @return CachePlug|static |
||
| 24 | */ |
||
| 25 | 2 | public function cache($ttl = null, $key = null, $store = null) |
|
| 30 |