From 9f40ab1e200cc3dcc20763738903103eb761489c Mon Sep 17 00:00:00 2001 From: William Poulin Date: Wed, 13 Dec 2023 14:18:04 -0500 Subject: [PATCH] fix(reaper): Add cache response from external API (#3148) --- src/apps/reaper/common/reaper.vault.cache-manager.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apps/reaper/common/reaper.vault.cache-manager.ts b/src/apps/reaper/common/reaper.vault.cache-manager.ts index 517783aa5..8786528f9 100644 --- a/src/apps/reaper/common/reaper.vault.cache-manager.ts +++ b/src/apps/reaper/common/reaper.vault.cache-manager.ts @@ -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 = { @@ -24,10 +24,10 @@ const NETWORK_CHAIN_ID_HEX: Partial> = { }; 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}`;