Runtime logs now show cache reasons
Key point
Vercel runtime logs now display the reason for cache misses, making it easier to debug and optimize performance.
Details
Vercel runtime logs now display a Cache Reason that explains why a request wasn't a fresh cache hit. You can identify causes of cache misses, such as time-based or tag-based revalidation, to improve hit rates.
This feature appears for any response the CDN can cache, including ISR, Partial Prerendering, and functions with Cache-Control headers set. Responses that are dynamically rendered on every request do not show a cache reason.
Possible reasons by cache status:
- MISS: Cold, Request collapsed, Error
- BYPASS: Draft Mode, Prerender Bypass, Crawler
- STALE: Time-based revalidation, Tag-based invalidation, Revalidation error
- REVALIDATED: Tag-based deletion
Selecting a request in the Logs tab shows the cache status along with the reason. The CLI also supports querying cache reasons via the vercel logs and vercel metrics commands, and the cdn-caching skill in the Vercel plugin lets you see how often each reason occurs across your traffic.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.