Skip to content

Commit

Permalink
Merge pull request #512 from helium/feat/metadata_entity_key_str
Browse files Browse the repository at this point in the history
Adding 1 day caching for /v2/metadata
  • Loading branch information
deasydoesit authored Dec 19, 2023
2 parents 66477ff + dc02e91 commit 229a2bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/metadata-service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,12 @@ server.get<{ Querystring: { subnetwork: string; cursor?: string; } }>(
};
});

reply.header("Cloudflare-CDN-Cache-Control", "no-cache");
if (isLastPage) {
reply.header("Cloudflare-CDN-Cache-Control", "no-cache");
} else {
reply.header("Cloudflare-CDN-Cache-Control", "max-age=86400"); // 1 day in seconds

}

return result;
}
Expand Down

0 comments on commit 229a2bd

Please sign in to comment.