liteflow-labs / starter-kit

NFT Marketplace running on the Liteflow infrastructure
https://demo.liteflow.com
Apache License 2.0
11 stars 43 forks source link

Add Cache-Control header #581

Open NicolasMahe opened 9 months ago

NicolasMahe commented 9 months ago

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