Skip to content

Commit

Permalink
feat: move ttl to constants file in shared module
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnigir1 committed Jul 30, 2024
1 parent 0dd3f0a commit 8e0015d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/pricing/src/pricing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -10,7 +11,7 @@ import { CoingeckoService } from "./services";
LoggerModule,
CacheModule.register({
store: "memory",
ttl: 60, // seconds
ttl: TOKEN_CACHE_TTL_IN_SEC,
}),
],
providers: [CoingeckoService],
Expand Down
Empty file removed libs/shared/src/constants.ts
Empty file.
1 change: 1 addition & 0 deletions libs/shared/src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const TOKEN_CACHE_TTL_IN_SEC = 60;

0 comments on commit 8e0015d

Please sign in to comment.