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

fix(reaper): Add cache response from external API #3148

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading