Cache Strategies with Best Practices
summary
Describes concrete tactics: introduce soft and hard TTL plus async refresh so expired keys keep serving while background refreshes run, and dynamic TTL based on change frequency; dedupe fallback to run one DB fetch for many concurrent misses; cache partial and empty results and cache DB error status with short TTL; persist or peer-copy local caches and use remote cache or sharding (one deployment example reduces per-node dataset to 25%); memory optimizations cut one structure from 7 GB to 700 MB.
AI-written summary · about
chapters (22)
- 0:00Intro
- 1:30Read-through Cache Architecture
- 2:24A simple cache implementation
- 3:35A production issue
- 5:22Async Cache Refresh
- 6:44Dynamic TTL
- 7:55Notification pipeline
- 8:37Time-to-live (TTL)
- 9:22A real production issue
- 10:15Dedup fallback calls
- 10:46Async cache update
- 12:07Cache partial, empty and error result
- 13:56Persistent cache
- 14:50cache rsync
- 15:32A shared remote cache
- 15:54schema upgrade
- 16:37cache warm up
- 17:51local cache format
- 18:47duplication objects
- 19:58remote cache schema
- 21:30Sharding and memory usage
- 22:27Conclusion
related talks
38mLazy Defenses: Using Scaled TTLs to Keep Your Cache Correct
42mCaching for Cash
43mCache Me Outside - Caching Methodologies & Architectures
27mCaching for Cash
47mCaching beyond simple put and gets
41mCaching Like a Pro: Best strategies for dealing with Drupal cache
06mEnlist the Help of Your Schema for Caching!
25mCaching strategies on https://dev.to
