Overview
The first step is not increasing every lifetime. Ask who may reuse a response and when a newer version must be retrieved.
Classify resources before writing rules
Versioned images, scripts and styles can follow release versions. Public pages need freshness planning, while account, cart and transaction responses need explicit user isolation.
- List paths, response-varying inputs and update frequency
- Inspect origin Cache-Control, Vary and cookies
- Create reproducible requests for exception paths
A smaller cache key is not always a better one
Tracking parameters can create duplicate objects, but product filters, image dimensions and language parameters may change the content. Combine requests only after establishing that their responses are equivalent.
Coordinate HTML and asset releases
Make new assets available before publishing pages that reference them. Retain older assets for an appropriate overlap period and ensure that rollback pages still reference available files.
Compare before and after with the same requests
Verify content and identity boundaries first, then compare cache reuse, origin traffic, errors and user experience. Restore correctness promptly if content or application behavior is wrong.