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