MCPcopy Create free account
hub / github.com/Rello/analytics / getCacheMetadata

Method getCacheMetadata

lib/Datasource/LocalJson.php:96–105  ·  view source on GitHub ↗
(array $option, int $mtime)

Source from the content-addressed store, hash-verified

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

Callers 1

readDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected