@tramvai/module-dns-cache 5.41.1 → 5.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/server.es.js CHANGED
@@ -95,8 +95,8 @@ const TramvaiDnsCacheModule = declareModule({
95
95
  scope: Scope.SINGLETON,
96
96
  useFactory: ({ createCache, envManager }) => {
97
97
  const max = Number(envManager.get('DNS_LOOKUP_CACHE_LIMIT'));
98
- const ttl = Number(envManager.get('DNS_LOOKUP_CACHE_TTL'));
99
- const cache = createCache('memory', { name: 'dns-lookup', max, ttl });
98
+ const dnsTTL = Number(envManager.get('DNS_LOOKUP_CACHE_TTL'));
99
+ const cache = createCache('memory', { name: 'dns-lookup', max, ttl: dnsTTL });
100
100
  const adapter = {
101
101
  set: (hostname, entries, ttl) => {
102
102
  return cache.set(hostname, entries, { ttl });
package/lib/server.js CHANGED
@@ -107,8 +107,8 @@ const TramvaiDnsCacheModule = core.declareModule({
107
107
  scope: core.Scope.SINGLETON,
108
108
  useFactory: ({ createCache, envManager }) => {
109
109
  const max = Number(envManager.get('DNS_LOOKUP_CACHE_LIMIT'));
110
- const ttl = Number(envManager.get('DNS_LOOKUP_CACHE_TTL'));
111
- const cache = createCache('memory', { name: 'dns-lookup', max, ttl });
110
+ const dnsTTL = Number(envManager.get('DNS_LOOKUP_CACHE_TTL'));
111
+ const cache = createCache('memory', { name: 'dns-lookup', max, ttl: dnsTTL });
112
112
  const adapter = {
113
113
  set: (hostname, entries, ttl) => {
114
114
  return cache.set(hostname, entries, { ttl });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-dns-cache",
3
- "version": "5.41.1",
3
+ "version": "5.45.0",
4
4
  "description": "DNS lookup cache",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@tinkoff/utils": "^2.1.2",
27
- "@tramvai/core": "5.41.1",
28
- "@tramvai/tokens-common": "5.41.1",
29
- "@tramvai/tokens-http-client": "5.41.1",
27
+ "@tramvai/core": "5.45.0",
28
+ "@tramvai/tokens-common": "5.45.0",
29
+ "@tramvai/tokens-http-client": "5.45.0",
30
30
  "cacheable-lookup": "^7.0.0"
31
31
  },
32
32
  "devDependencies": {},