diff --git a/libs/pricing/src/pricing.module.ts b/libs/pricing/src/pricing.module.ts index 1154094..7e1fd53 100644 --- a/libs/pricing/src/pricing.module.ts +++ b/libs/pricing/src/pricing.module.ts @@ -2,6 +2,7 @@ import { CacheModule } from "@nestjs/cache-manager"; import { Module } from "@nestjs/common"; import { LoggerModule } from "@zkchainhub/shared"; +import { TOKEN_CACHE_TTL_IN_SEC } from "@zkchainhub/shared/constants/"; import { CoingeckoService } from "./services"; @@ -10,7 +11,7 @@ import { CoingeckoService } from "./services"; LoggerModule, CacheModule.register({ store: "memory", - ttl: 60, // seconds + ttl: TOKEN_CACHE_TTL_IN_SEC, }), ], providers: [CoingeckoService], diff --git a/libs/shared/src/constants.ts b/libs/shared/src/constants.ts deleted file mode 100644 index e69de29..0000000 diff --git a/libs/shared/src/constants/index.ts b/libs/shared/src/constants/index.ts new file mode 100644 index 0000000..3a2df37 --- /dev/null +++ b/libs/shared/src/constants/index.ts @@ -0,0 +1 @@ +export const TOKEN_CACHE_TTL_IN_SEC = 60;