| 186 | } |
| 187 | |
| 188 | private function getCacheMetadata(array $option, int $mtime): array { |
| 189 | $currentCacheKey = 'lsx-v2-' . md5($option['link'] . '|' . $mtime); |
| 190 | $clientCacheKey = isset($option['cacheKey']) ? trim((string)$option['cacheKey'], '"') : ''; |
| 191 | |
| 192 | return [ |
| 193 | 'cacheable' => true, |
| 194 | 'key' => $currentCacheKey, |
| 195 | 'notModified' => ($clientCacheKey !== '' && $clientCacheKey === $currentCacheKey), |
| 196 | ]; |
| 197 | } |
| 198 | |
| 199 | private function validateRanges(string $rangeList): ?string { |
| 200 | $ranges = str_getcsv($rangeList); |