Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki committed Nov 5, 2024
1 parent e9541b2 commit a29370b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/suggested-fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,9 @@ const handler = async (
responseJson,
});

// Only cache response if exclusivity
if (exclusiveRelayer !== sdk.constants.ZERO_ADDRESS) {
// Only cache response if exclusivity is not set. This prevents race conditions where
// cached exclusivity data is returned for multiple deposits.
if (exclusiveRelayer === sdk.constants.ZERO_ADDRESS) {
response.setHeader("Cache-Control", "s-maxage=10");
}
response.status(200).json(responseJson);
Expand Down

0 comments on commit a29370b

Please sign in to comment.