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

Method getCacheMetadata

lib/Datasource/Github.php:265–274  ·  view source on GitHub ↗
($option)

Source from the content-addressed store, hash-verified

263 }
264
265 private function getCacheMetadata($option): array {
266 $currentCacheKey = 'gh-' . (string)floor(time() / self::CACHE_TTL_SECONDS);
267 $clientCacheKey = isset($option['cacheKey']) ? trim((string)$option['cacheKey'], '"') : '';
268
269 return [
270 'cacheable' => true,
271 'key' => $currentCacheKey,
272 'notModified' => ($clientCacheKey !== '' && $clientCacheKey === $currentCacheKey),
273 ];
274 }
275
276 private function buildHttpErrorResult(int $httpCode, array $curlResult, array $cache): array {
277 return [

Callers 1

readDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected