Edit: Article Caching strategies that survive a deploy

A cache that you cannot invalidate confidently is a liability dressed up as a feature. The hardest bugs in a content site are almost always stale data served long after an editor thought they fixed it.

Key your cache on content that actually changes, such as a row version or a last-modified timestamp, rather than on a clock. That way a deploy or a save naturally produces a new key instead of relying on a sweep.

Layer your caches deliberately: the database page cache, an application object cache, and an HTTP cache each solve a different problem. Mixing their responsibilities is how you end up debugging ghosts.