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

Method getDatasourceCacheKey

lib/Controller/OutputController.php:236–248  ·  view source on GitHub ↗
(array $reportMetadata, ?string $clientCacheKey)

Source from the content-addressed store, hash-verified

234 }
235
236 private function getDatasourceCacheKey(array $reportMetadata, ?string $clientCacheKey): ?string {
237 if ($clientCacheKey === null || $clientCacheKey === '') {
238 return null;
239 }
240
241 $prefix = (string)((int)$reportMetadata['version']) . ':';
242 if (!str_starts_with($clientCacheKey, $prefix)) {
243 return null;
244 }
245
246 $datasourceCacheKey = substr($clientCacheKey, strlen($prefix));
247 return $datasourceCacheKey !== '' ? $datasourceCacheKey : null;
248 }
249
250 private function buildExternalCacheKey(array $reportMetadata, string $datasourceCacheKey): string {
251 return (string)((int)$reportMetadata['version']) . ':' . $datasourceCacheKey;

Callers 2

readMethod · 0.95
readPanoramaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected