(array $option, int $mtime)
| 93 | } |
| 94 | |
| 95 | private function getCacheMetadata(array $option, int $mtime): array { |
| 96 | $currentCacheKey = 'ljson-' . md5($option['link'] . '|' . $mtime); |
| 97 | $clientCacheKey = isset($option['cacheKey']) ? trim((string)$option['cacheKey'], '"') : ''; |
| 98 | |
| 99 | return [ |
| 100 | 'cacheable' => true, |
| 101 | 'key' => $currentCacheKey, |
| 102 | 'notModified' => ($clientCacheKey !== '' && $clientCacheKey === $currentCacheKey), |
| 103 | ]; |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Parses JSON data based on the provided options and raw input. |