Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cache configuration added
Browse files Browse the repository at this point in the history
rupamkairi committed Jan 9, 2025
1 parent fff57a5 commit f4b2e05
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**
5 changes: 4 additions & 1 deletion apps/server/src/pages/api/v1/fires/index.ts
Original file line number Diff line number Diff line change
@@ -65,8 +65,11 @@ export default async function firesBySiteHandler(

res.setHeader(
"Cache-Control",
"public, s-maxage=10800, stale-while-revalidate=86400"
"public, max-age=7200 s-maxage=3600, stale-while-revalidate=7200"
);
res.setHeader("CDN-Cache-Control", "max-age=7200");
res.setHeader("Cloudflare-CDN-Cache-Control", "max-age=7200");

res.status(200).json(fires);
} catch (error) {
console.log(error);

0 comments on commit f4b2e05

Please sign in to comment.