(body, callerKey = '')
| 127 | * that serialize to identical strings. |
| 128 | */ |
| 129 | export function cacheKey(body, callerKey = '') { |
| 130 | const scope = String(callerKey || ''); |
| 131 | const json = JSON.stringify(normalize(body)); |
| 132 | return createHash('sha256').update(scope).update('\0').update(json).digest('hex'); |
| 133 | } |
| 134 | |
| 135 | export function cacheGet(key) { |
| 136 | if (!isCacheEnabled()) return null; |
no test coverage detected