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

Method getCacheMetadata

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

Source from the content-addressed store, hash-verified

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.

Callers 1

readDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected