diff --git a/apps/insights/src/cache.ts b/apps/insights/src/cache.ts index 410ac55c81..140670fc9c 100644 --- a/apps/insights/src/cache.ts +++ b/apps/insights/src/cache.ts @@ -9,8 +9,12 @@ const transformer = { deserialize: parse, }; -export const DEFAULT_CACHE_TTL = 3600; // 1 hour -export const DEFAULT_CACHE_STALE = 86_400; // 24 hours +// export const DEFAULT_CACHE_TTL = 3600; // 1 hour +// export const DEFAULT_CACHE_STALE = 86_400; // 24 hours + + +export const DEFAULT_CACHE_TTL = 60; // 1 minute +export const DEFAULT_CACHE_STALE = 60; // 1 minute export const redisCache: ACDCache = createCache({ transformer, diff --git a/apps/insights/src/services/pyth/get-metadata.ts b/apps/insights/src/services/pyth/get-metadata.ts index a87dd0733f..66466d3c10 100644 --- a/apps/insights/src/services/pyth/get-metadata.ts +++ b/apps/insights/src/services/pyth/get-metadata.ts @@ -1,11 +1,11 @@ import { clients, Cluster } from "."; -import { memoryOnlyCache } from "../../cache"; +// import { memoryOnlyCache } from "../../cache"; -const getPythMetadata = async (cluster: Cluster) => { +export const getPythMetadataCached = async (cluster: Cluster) => { return clients[cluster].getData(); }; -export const getPythMetadataCached = memoryOnlyCache.define( - "getPythMetadata", - getPythMetadata, -).getPythMetadata; +// export const getPythMetadataCached = memoryOnlyCache.define( +// "getPythMetadata", +// getPythMetadata, +// ).getPythMetadata;