Skip to content

Conversation

NicolasMahe
Copy link
Member

@NicolasMahe NicolasMahe commented Feb 21, 2024

Description

Add Cache-Control header to allow Vercel to cache the server-side generated HTML.

With this, when a page is cached, subsequent users will get this cached page.
When the cache expires after 10sec, Vercel still returns the cached page if it is less than 50sec expired but also update it in the background (stale-while-revalidate). So when there is at least one loading of the page every 60sec, users should always get a cached version that is max 60sec old.

This cache is only saved when the user is not logged in. But logged in users will get a "public" cache version if one exist. I didn't find a way to disable this. The page is flickering on component that are loading user-specific data.

How to test

Checklist

  • Base branch of the PR is dev

@NicolasMahe NicolasMahe self-assigned this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant