(array $reportMetadata, ?string $clientCacheKey)
| 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; |
no outgoing calls
no test coverage detected