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

Method getDatasourceCacheKey

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

Source from the content-addressed store, hash-verified

197 }
198
199 private function getDatasourceCacheKey(array $reportMetadata, ?string $clientCacheKey): ?string {
200 if ($clientCacheKey === null || $clientCacheKey === '') {
201 return null;
202 }
203
204 $prefix = (string)((int)$reportMetadata['version']) . ':';
205 if (!str_starts_with($clientCacheKey, $prefix)) {
206 return null;
207 }
208
209 $datasourceCacheKey = substr($clientCacheKey, strlen($prefix));
210 return $datasourceCacheKey !== '' ? $datasourceCacheKey : null;
211 }
212
213 private function buildExternalCacheKey(array $reportMetadata, string $datasourceCacheKey): string {
214 return (string)((int)$reportMetadata['version']) . ':' . $datasourceCacheKey;

Callers 2

readMethod · 0.95
readPanoramaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected