Add timing to SWR cache header
This commit is contained in:
parent
d557514210
commit
d282948d50
4
src/cache/index.ts
vendored
4
src/cache/index.ts
vendored
@ -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',
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user