1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 14:45:31 -04:00

lengthen cache-control headers

This commit is contained in:
2022-05-02 10:29:01 -04:00
parent d8d7d7d775
commit 64303400a4
10 changed files with 36 additions and 27 deletions

View File

@@ -46,7 +46,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const siteStats = await getSiteStats(client);
// let Vercel edge cache results for 15 mins
res.setHeader("Cache-Control", "s-maxage=900, stale-while-revalidate");
res.setHeader("Cache-Control", "s-maxage=900, stale-while-revalidate=60");
// return in JSON format
return res.status(200).json(siteStats);