Skip to content

Commit

Permalink
fix: bump cache from 7d to 31d
Browse files Browse the repository at this point in the history
Increase the cache header from 7 days to 31 days
  • Loading branch information
styfle authored Aug 12, 2024
1 parent b774c66 commit 5309c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export async function handler(req: IncomingMessage, res: ServerResponse) {
TMPDIR,
);
res.setHeader('Content-Type', mimeType('*.svg'));
res.setHeader('Cache-Control', cacheControl(isProd, cacheResult ? 7 : 0));
res.setHeader('Cache-Control', cacheControl(isProd, cacheResult ? 31 : 0));
res.end(getBadgeSvg(pkgSize));
} else if (pathname === pages.apiv1 || pathname === pages.apiv2) {
const parsed = parsePackageString(query.p as string);
Expand Down

0 comments on commit 5309c83

Please sign in to comment.