Use stale-while-revalidate Cache-Control headers instead?

This commit is contained in:
2022-09-19 23:50:54 +02:00
parent 3a7056cce6
commit 39fc74d8e9

View File

@@ -87,7 +87,7 @@ export const load: PageServerLoad = async ({ setHeaders }) => {
}`) }`)
if (res) { if (res) {
setHeaders({ 'Cache-Control': 'public, max-age=3600' }) setHeaders({ 'Cache-Control': 'public, max-age=1, stale-while-revalidate=59' })
const { data: { countPhotos, countLocations, countCountries, ...rest }} = res const { data: { countPhotos, countLocations, countCountries, ...rest }} = res