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

Method getCacheMetadata

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

Source from the content-addressed store, hash-verified

250 }
251
252 private function getCacheMetadata($option): array {
253 $currentCacheKey = 'gh-' . (string)floor(time() / self::CACHE_TTL_SECONDS);
254 $clientCacheKey = isset($option['cacheKey']) ? trim((string)$option['cacheKey'], '"') : '';
255
256 return [
257 'cacheable' => true,
258 'key' => $currentCacheKey,
259 'notModified' => ($clientCacheKey !== '' && $clientCacheKey === $currentCacheKey),
260 ];
261 }
262
263 private function buildHttpErrorResult(int $httpCode, array $curlResult, array $cache): array {
264 return [

Callers 1

readDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected