(
chartType: string,
encodingMap: any,
config: any,
tableRowCount: number,
tableContentHash: string | undefined,
tableId: string,
tableMetadata?: any,
activeVariantId?: string,
activeVariantSpec?: any,
)
| 102 | * for the data sizes involved (~KB range). |
| 103 | */ |
| 104 | export function computeCacheKey( |
| 105 | chartType: string, |
| 106 | encodingMap: any, |
| 107 | config: any, |
| 108 | tableRowCount: number, |
| 109 | tableContentHash: string | undefined, |
| 110 | tableId: string, |
| 111 | tableMetadata?: any, |
| 112 | activeVariantId?: string, |
| 113 | activeVariantSpec?: any, |
| 114 | ): string { |
| 115 | return JSON.stringify({ |
| 116 | chartType, |
| 117 | encodingMap, |
| 118 | config: config || {}, |
| 119 | tableRowCount, |
| 120 | tableContentHash: tableContentHash || tableId, |
| 121 | tableMetadata: tableMetadata || {}, |
| 122 | // Variant fields are intentionally last so default-chart cache keys |
| 123 | // are stable across versions that didn't track variants. |
| 124 | activeVariantId: activeVariantId || null, |
| 125 | activeVariantSpec: activeVariantSpec || null, |
| 126 | }); |
| 127 | } |
no outgoing calls
no test coverage detected