(fieldName: string, cacheKey?: string)
| 169 | } |
| 170 | |
| 171 | private makeKey(fieldName: string, cacheKey?: string): string { |
| 172 | // Encode both components unambiguously. A raw `${fieldName}:${cacheKey}` |
| 173 | // join collides when a field name itself contains a colon, e.g. |
| 174 | // makeKey("foo", "bar:baz") === makeKey("foo:bar", "baz"). JSON-encoding a |
| 175 | // tuple keeps every (fieldName, cacheKey) pair distinct. Empty/undefined |
| 176 | // cacheKey collapse to the same key (legacy behavior). |
| 177 | return JSON.stringify([fieldName, cacheKey || null]); |
| 178 | } |
| 179 | |
| 180 | /** Decode the field-name component of a key produced by {@link makeKey}. */ |
| 181 | private keyFieldName(key: string): string | undefined { |
no outgoing calls
no test coverage detected