Problem Statement
Which cache key design prevents accidental collisions and supports versioning?
Explanation
Namespacing with a type and version keeps different shapes separate. Including query-affecting parameters ensures distinct representations map to distinct keys.
Avoid bare IDs or ad-hoc keys that collide across feature changes.
Code Solution
SolutionRead Only
key = `${ns}:v${version}:${id}?${paramSig}`