The grid (core) ยท console.warn
config.context is not JSON-serialisable; cache keys ignore it.
Printed by The grid (core), prefixed [lattice], since 1.0.1.
Warnings reference › source.context.unserialisable
- Identifier
source.context.unserialisable- Raised by
- The grid (core)
- Since
- 1.0.1
What happened
context is part of what makes a fetch unique, so it goes into the cache key. This one cannot be serialised - a function, a circular structure, a Map - so the key is computed without it. Two requests differing only in their context now look like the same request and one may be served from the other's cached result.
The fix
Keep context to plain JSON-serialisable data.
Reference
Covered in full at the API reference.