diff --git a/middlewares/api/cache.ts b/middlewares/api/cache.ts index f2b3ce4..80d4948 100644 --- a/middlewares/api/cache.ts +++ b/middlewares/api/cache.ts @@ -9,7 +9,10 @@ export const setCacheControl = ( query: { cache_time, _vercel_no_cache }, } = res.locals; - res.setHeader("Cache-Control", "max-age=60, stale-while-revalidate=2592000"); + res.setHeader( + "Cache-Control", + `max-age=${cache_time}, stale-while-revalidate=2592000` + ); if (_vercel_no_cache === undefined) { res.setHeader( "CDN-Cache-Control",