ISR revalidatePath, revalidateAll, revalidateTag
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
Currently the way to force the revalidation of an ISR page is to query the server like this:
GETorHEADrequest withx-prerender-revalidate: <token>will force the asset to be re-validated
I have some data that is displayed on all pages of my website, and would like to invalidate all pages when the data is updated. Currently I workaround this issue by redeploying the app, but as this is done frequently I'm interested in a quicker ISR cache invalidation instead.
Describe the proposed solution
The revalidatePath from NextJS would solve my issue assuming I can revalidateAll = () => revalidatePath('/'). NextJS also proposes revalidating by tag using revalidateTag.
Importance
nice to have
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing ISR handling for the x-prerender-revalidate request header. Then examine how revalidatePath, revalidateAll, and revalidateTag should fit the cache invalidation model; the work is done when the proposed invalidation APIs support the described page-wide and tag-based use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100