Cache Inspector
Record and search the history of a deployment's cache — every generation, regeneration, invalidation and tag.
The Cache Inspector records what happens to a deployment's cache: every version of a page or of cached data (a generation), every regeneration, every invalidation and every tag. Use it to find out why a page shows what it shows, and when it will change.
Turn it on
- Open Cache Inspector in the project's sidebar.
- Under Recording, tick Enable Cache Inspector and choose Save changes.
- Deploy again, for example with Deploy latest on the Deployments page.
Only deployments made after it is turned on are recorded, which is why step 3 is needed for the deployment being served. Until then, the Cache Inspector page says that the published deployment recorded nothing, instead of leading to its cache. Serving is the same with the Cache Inspector on or off.
Cache Inspector is included in Pro, with no separate monthly fee. Owners and admins can enable recording per project. A team on the free plan must subscribe to Pro first. If Pro ends, recording is turned off for the team.
While a deployment records, its writes to the cache are counted as Inspectable ISR writes in place of ISR writes, at the rates on the pricing page; see Usage.
To turn it on through the API:
curl -X POST https://api.arkor.dev/v1/projects/$PROJECT_ID/cache-inspector \
-H "authorization: Bearer $ARKOR_TOKEN" \
-H "content-type: application/json" \
-d '{ "enabled": true }'Enabling recording requires an active Pro plan. Turning it off does not require Pro.
Open a deployment's cache
While the project records, the Cache Inspector page leads to the cache of the published deployment: choose Entries, Tags, History or Index. For another deployment, open it from the Deployments page and choose the Cache tab. Its pages are:
- Entries: recorded cache entries, with search and filters.
- Tags: every tag, and whether it has been invalidated.
- History: everything that happened to the cache, newest first.
- Index: whether what the pages show is up to date.
Find an entry
Entries opens directly on a paged list of the deployment's recorded runtime cache entries,
with an entry's details beside it. Pages, Route Handlers and data cached with fetch or use cache
share this list. Entries whose route is absent from the build are also included.
To search, use Pathname or route: an exact pathname such as /blog, a pathname prefix,
or a route such as /blog/[slug]. Filter by type: Page (App Router),
Page (Pages Router), Route handler, Data (fetch) or Data (use cache).
Select an entry to see its lifetime, whether it is fresh or stale now, and its tags. Choose Open entry for everything recorded about it. Next page continues through the list; Clear filters returns to the unfiltered first page and clears the selection.
An empty unfiltered list means the index has no recorded entries yet. A search with no matches has its own message; clear the filters to browse the recorded entries again.
Choose Build output for the deployment's route tree, rendering modes and prerendered shells. From that tree, View cache entries opens this list filtered to a route.
The list is a snapshot of the Inspector's search index. Its footer gives the revision, when it was indexed and when it was evaluated; recent changes may not be reflected yet. These are recorded entries, not a live inventory of every Cloudflare data center's cache. The Cloudflare Cache API stores cache contents locally to the data center handling a request.
Read an entry
An entry's page shows:
- State: which generation is current, and whether a regeneration is under way.
- Generations: every version, newest first, with where it came from (the build or a regeneration) and how long it lives.
- Regeneration attempts: each attempt to regenerate the entry, and how it ended.
- Invalidations: each
revalidateTag,updateTagorrevalidatePaththat reached it.
Read a generation
Choose a generation to see its lifetime (Stale after, Expires after), its Validity now (fresh, stale or expired, and why), its tags and its outputs. Owners and admins can also open the stored page, as a preview or as HTML, and download it.
Compare two generations
In an entry's Generations, choose Compare to see what changed between a generation and the one before it, line by line.
Tags lists every tag the cache holds, with how many generations and entries carry it and when
it was last invalidated. Tags you set with cacheTag or fetch are explicit; tags Next.js adds
for each route are implicit. Choose a tag to see the generations made with it and each
invalidation that named it.
History lists the cache's events, its invalidations and its regeneration attempts, newest first. For an invalidation it shows whether it expired pages at once (immediate) or let them be served until regenerated (stale-while-revalidate), and how far it has reached.
Who can see what
Everyone in the team can open the Cache Inspector page, and see entries, generations, tags and history. Only owners and admins can turn recording on or off, open stored pages and headers, download them, and compare generations.
What is kept
While a deployment records, a generation's stored page is kept for 7 days after a newer one replaces it, and the history for 30 days.
Turn it off
Untick Enable Cache Inspector and choose Save changes. Every deployment of the project stops recording, and one that has stopped does not record again, even if the Cache Inspector is turned back on: the next deployment does. What was recorded before is shown again once it is back on.
Troubleshooting
| Message | What to do |
|---|---|
| The Cache Inspector is off for this project | Turn it on, then deploy again. |
| This deployment recorded nothing of its runtime cache | The deployment was made while the Cache Inspector was off. Deploy again to record. |
| The inspector did not answer | Try again shortly. Your site is not affected. |
| Index status delayed or stalled | The pages are behind the cache by more than a minute (delayed) or a quarter of an hour (stalled). What is served is not affected. |