@nxtedition/nxt-undici 6.2.26 → 6.2.28

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.
@@ -15,7 +15,7 @@ class CacheHandler extends DecoratorHandler {
15
15
  #maxEntrySize
16
16
  #maxEntryTTL
17
17
 
18
- constructor(key, { store, logger, handler, maxEntrySize }) {
18
+ constructor(key, { store, logger, handler, maxEntrySize, maxEntryTTL }) {
19
19
  super(handler)
20
20
 
21
21
  this.#key = key
@@ -23,7 +23,7 @@ class CacheHandler extends DecoratorHandler {
23
23
  this.#value = null
24
24
  this.#store = store
25
25
  this.#maxEntrySize = maxEntrySize ?? store.maxEntrySize ?? DEFAULT_MAX_ENTRY_SIZE
26
- this.#maxEntryTTL = maxEntrySize ?? store.maxEntryTTL ?? DEFAULT_MAX_ENTRY_TTL
26
+ this.#maxEntryTTL = maxEntryTTL ?? store.maxEntryTTL ?? DEFAULT_MAX_ENTRY_TTL
27
27
  }
28
28
 
29
29
  onConnect(abort) {
@@ -157,6 +157,7 @@ export class SqliteCacheStore {
157
157
  const now = getFastNow()
158
158
  if (now > this.#deleteExpiredValuesTime + 60e3) {
159
159
  this.#deleteExpiredValuesQuery.run(now)
160
+ this.#deleteExpiredValuesTime = now
160
161
  }
161
162
 
162
163
  this.#insertValueQuery.run(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "6.2.26",
3
+ "version": "6.2.28",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",