| 169 | } |
| 170 | |
| 171 | private function getCacheMetadata(array $option, int $mtime): array { |
| 172 | $currentCacheKey = 'lsx-' . md5($option['link'] . '|' . $mtime); |
| 173 | $clientCacheKey = isset($option['cacheKey']) ? trim((string)$option['cacheKey'], '"') : ''; |
| 174 | |
| 175 | return [ |
| 176 | 'cacheable' => true, |
| 177 | 'key' => $currentCacheKey, |
| 178 | 'notModified' => ($clientCacheKey !== '' && $clientCacheKey === $currentCacheKey), |
| 179 | ]; |
| 180 | } |
| 181 | |
| 182 | private function validateRanges(string $rangeList): ?string { |
| 183 | $ranges = str_getcsv($rangeList); |