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

Commit

Permalink
fix(reaper): Add cache response from external API (#3148)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin authored Dec 13, 2023
1 parent 360053f commit 9f40ab1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/apps/reaper/common/reaper.vault.cache-manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Axios from 'axios';

//import { Cache } from '~cache/cache.decorator';
import { Cache } from '~cache/cache.decorator';
import { Network } from '~types/network.interface';

type ReaperVaultData = {
Expand All @@ -24,10 +24,10 @@ const NETWORK_CHAIN_ID_HEX: Partial<Record<Network, string>> = {
};

export class ReaperVaultCacheManager {
/*@Cache({
key: (network: Network) => `studio:reaper:${network}:farms`,
ttl: 15 * 60, // 60 minutes
})*/
@Cache({
key: (network: Network) => `studio:reaper:${network}:vaults`,
ttl: 15 * 60, // 15 minutes
})
private async getVaultData(network: Network) {
const chainIdHex = NETWORK_CHAIN_ID_HEX[network];
const url = `https://2ch9hbg8hh.execute-api.us-east-1.amazonaws.com/dev/api/vaults/${chainIdHex}`;
Expand Down

0 comments on commit 9f40ab1

Please sign in to comment.