Systems Design
Caching is a product decision, not a performance afterthought
Where you cache changes what users see, what admins can trust, and how quickly a catalog updates. Treat it like a product surface.
Adding Redis to a catalog is easy. Deciding what a stale price means is not. In an e-commerce build, caching categories and product listings bought real latency improvements, but it also created a product question: when an admin edits a banner, how long should the storefront keep showing the old one?
The useful rule was to cache read-heavy, low-write domains with explicit invalidation on write, and to leave inventory and orders transactional. Cache keys were scoped per entity so a category change could not accidentally invalidate the wrong surface. TTLs became visible configuration rather than hidden constants.
The mistake I see most often is treating the cache as an infrastructure detail. It is not. Every cache is a claim about acceptable staleness, and that claim is visible to the person using the product. If a seller updates stock and the storefront lies for ten minutes, that is not a performance win — it is a correctness bug.
Decide the freshness contract first. The implementation is the easy half.
“Every cache is a promise about how stale your product is allowed to be. Make that promise on purpose.”