sveltejs / sveltejs/kit

ISR revalidatePath, revalidateAll, revalidateTag

Open
#9,674 7 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pkg:adapter-vercel
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:

GET or HEAD request with x-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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.