Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/lib/dsvgui/next-13.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sametcodes committed May 14, 2024
2 parents f055f19 + 03c45fb commit edf0f1b
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 200 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ _All your statistics at once._
![](https://readme.rocks/api/view/6431b08616981eaebfd030f9)
![](https://readme.rocks/api/view/6431b559ddde9c1558a16fe6)

## Project progress with milestones

<a href="https://github.com/sametcodes/readme.rocks/milestone/4">
<img width="450px" src="https://readme.rocks/api/view/6434324683b8f4f727a83c32" />
<a href="https://github.com/sponsorships/d-fischer">
<a href="https://github.com/sametcodes/readme.rocks/milestone/2">
<img width="450px" src="https://readme.rocks/api/view/64a70675d1e3cba955dc7df9" />
</a>

## Line stats
![](https://readme.rocks/api/view/6440669e4c5d605274994a4b)

Expand Down
58 changes: 29 additions & 29 deletions lib/@dsvgui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions middlewares/api/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ export const setCacheControl = (
query: { cache_time, _vercel_no_cache },
} = res.locals;

res.setHeader("Cache-Control", "max-age=60");
res.setHeader(
"Cache-Control",
`max-age=${cache_time}, stale-while-revalidate=2592000`
);
if (_vercel_no_cache === undefined) {
res.setHeader("CDN-Cache-Control", `max-age=${cache_time}`);
res.setHeader("Vercel-CDN-Cache-Control", `max-age=${cache_time}`);
res.setHeader(
"CDN-Cache-Control",
`max-age=${cache_time}, stale-while-revalidate=2592000`
);
res.setHeader(
"Vercel-CDN-Cache-Control",
`max-age=${cache_time}, stale-while-revalidate=2592000`
);
}

next();
Expand Down
Loading

0 comments on commit edf0f1b

Please sign in to comment.