From d282948d507efaa014209e404c98bf17453742a2 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Mon, 11 Sep 2023 17:04:44 -0500 Subject: [PATCH] Add timing to SWR cache header --- src/cache/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cache/index.ts b/src/cache/index.ts index 058c8832..5a3cddaf 100644 --- a/src/cache/index.ts +++ b/src/cache/index.ts @@ -45,7 +45,7 @@ export const getPhotoCached: typeof getPhoto = (...args) => export const getImageCacheHeadersForAuth = async (session?: Session) => { return { 'Cache-Control': !session?.user - ? 's-maxage=3600, stale-while-revalidate' - : 's-maxage=1, stale-while-revalidate', + ? 's-maxage=3600, stale-while-revalidate=59' + : 's-maxage=1, stale-while-revalidate=59', }; };