Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(prices): Cache prices for 1 minute (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
immasandwich authored May 9, 2022
1 parent d1ef980 commit 9920de0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/token/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class TokenService {
});
}

@Cache({ key: (network: Network) => `token-prices:${network}` })
@Cache({ key: (network: Network) => `token-prices:${network}`, ttl: 60 })
async getTokenPrices(network: Network) {
const { data: tokenPrices } = await this.axios.get<BaseToken[]>('/v1/prices-v3', { params: { network } });
return tokenPrices;
Expand Down

0 comments on commit 9920de0

Please sign in to comment.