The Apollo Cache is Your Friend, if You Get To Know It
summary
Shows how Apollo Client 3 at Shopify actually stores a normalized in‑memory cache, why fetch policies like cache-first default and network-only matter, and when updates merge versus require custom update functions. Demonstrates a real bug where product metadata and metadata collide because a nested values object lacks an identifier and the fix is add ID to values. Covers list ordering, add/remove pitfalls, garbage collection, retention and eviction APIs and when to call gc to reclaim orphaned objects.
AI-written summary · about
chapters (7)
- 0:00Start
- 0:32Befriend the Apollo Cache
- 2:11A representation of your data
- 4:33Cache normalization?
- 4:50Normalizing in steps
- 5:41Assigning unique identifiers
- 6:45Put the objects into a flattened data structure
related talks
08mFine-tuning Apollo Client's normalized cache
24mGraphQL Clients
07mCache me if you can: Wayfair's secret to snappier apps
21mCaching GraphQL APIs
06mEnlist the Help of Your Schema for Caching!
31mDeep Dive into Apollo Client
16mLightning Talk: Next-Generation GraphQL Cache Management in Your Android and iOS Apps
21mCaching your GraphQL data graph
