Add timing to SWR cache header

This commit is contained in:
Sam Becker 2023-09-11 17:04:44 -05:00
parent d557514210
commit d282948d50

4
src/cache/index.ts vendored
View File

@ -45,7 +45,7 @@ export const getPhotoCached: typeof getPhoto = (...args) =>
export const getImageCacheHeadersForAuth = async (session?: Session) => { export const getImageCacheHeadersForAuth = async (session?: Session) => {
return { return {
'Cache-Control': !session?.user 'Cache-Control': !session?.user
? 's-maxage=3600, stale-while-revalidate' ? 's-maxage=3600, stale-while-revalidate=59'
: 's-maxage=1, stale-while-revalidate', : 's-maxage=1, stale-while-revalidate=59',
}; };
}; };