What you need to know
Caching can remove repeat downloads and make navigation feel quicker. Incorrect rules can keep stale HTML or API responses visible after a deploy, so the policy should reflect how the URL changes.
How to apply it
Cache immutable hashed assets for a long time, give HTML an appropriate revalidation policy, and verify headers in production. Use versioned filenames when content changes.
Common mistake to avoid
Do not apply long immutable caching to a file whose URL stays the same while its content changes. Users may continue seeing an old version.
