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

Method getCacheMetadata

lib/Datasource/ExternalJson.php:131–140  ·  view source on GitHub ↗
($option)

Source from the content-addressed store, hash-verified

129 }
130
131 private function getCacheMetadata($option): array {
132 $currentCacheKey = 'json-' . (string)floor(time() / self::CACHE_TTL_SECONDS);
133 $clientCacheKey = isset($option['cacheKey']) ? trim((string)$option['cacheKey'], '"') : '';
134
135 return [
136 'cacheable' => true,
137 'key' => $currentCacheKey,
138 'notModified' => ($clientCacheKey !== '' && $clientCacheKey === $currentCacheKey),
139 ];
140 }
141
142 /**
143 * 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