From c20ca36a41257b82cc872f87f4b219b0e15db030 Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Fri, 5 May 2023 22:21:31 +0100 Subject: [PATCH] Re-enable API caching 5 minute cache, forcing revalidate when stale. May up this during FWA or other cons. I'm expecting as time goes on fursona endpoints stabilise and are updated less often, letting me increase this further. --- api/[domain]/fursona.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/[domain]/fursona.ts b/api/[domain]/fursona.ts index 1f90cee..14671c5 100644 --- a/api/[domain]/fursona.ts +++ b/api/[domain]/fursona.ts @@ -29,7 +29,7 @@ export default async (request: Request) => { return new Response(JSON.stringify(data), { headers: { 'content-type': 'application/json' - // 'cache-control': 'public, max-age=600, stale-while-revalidate=1200', + 'cache-control': 'public, max-age=300, must-revalidate', } }); };