Priority
P1 — High — resolve before broad production adoption or large-scale use.
Problem
The local cache stores and returns the original object reference, while Redis returns a deserialized value. Mutating a local hit can mutate future cached results and makes value identity/ownership depend on which layer served the request.
Evidence:
Open decision
Choose among an immutable caller contract, clone-on-read/write, serializer round-tripping, or an explicit ownership mode. Benchmark copying approaches before selecting one.
Acceptance criteria
- Document whether callers may mutate returned values.
- Make local and remote behavior intentionally consistent, or clearly and safely distinguish them.
- Add nested-object and collection mutation tests.
- Measure any cloning or serialization overhead.
- Do not impose hidden copying cost without an approved API/behavior decision.
Priority
P1 — High — resolve before broad production adoption or large-scale use.
Problem
The local cache stores and returns the original object reference, while Redis returns a deserialized value. Mutating a local hit can mutate future cached results and makes value identity/ownership depend on which layer served the request.
Evidence:
Open decision
Choose among an immutable caller contract, clone-on-read/write, serializer round-tripping, or an explicit ownership mode. Benchmark copying approaches before selecting one.
Acceptance criteria