refactor: improve cache control headers formatting (#4536)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This commit is contained in:
Ophelia Goldstein
2025-10-07 22:44:33 +03:00
committed by GitHub
co-authored by Alexandr
parent 195e2fc72d
commit f7920901b6
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -31,7 +31,9 @@ const resolveCacheSeconds = ({ requested, def, min, max }) => {
const setCacheHeaders = (res, cacheSeconds) => {
res.setHeader(
"Cache-Control",
`max-age=${cacheSeconds}, s-maxage=${cacheSeconds}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
`max-age=${cacheSeconds}, ` +
`s-maxage=${cacheSeconds}, ` +
`stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
);
};