| Conditions | 4 |
| Paths | 5 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | protected function handlePostBoot(bool $isCaching, ?bool $hasCache, string $key, $meta): void |
||
| 36 | { |
||
| 37 | if (!$isCaching) { |
||
| 38 | Cache::forget($key); |
||
| 39 | return; |
||
| 40 | } |
||
| 41 | $hasCache = isset($hasCache) ? boolval($hasCache) : false; |
||
| 42 | if (!$hasCache) { |
||
| 43 | $cacheTime = abs(intval(env('APP_METADATA_CACHE_DURATION', 10))); |
||
| 44 | $cacheTime = max($cacheTime, 1); |
||
| 45 | Cache::put($key, $meta, $cacheTime); |
||
| 46 | } |
||
| 57 |