@nxtedition/cache 2.1.4 → 2.1.5

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.
Files changed (2) hide show
  1. package/lib/memory.js +4 -0
  2. package/package.json +2 -2
package/lib/memory.js CHANGED
@@ -121,6 +121,10 @@ export class MemoryCache {
121
121
  }
122
122
 
123
123
  #prune() {
124
+ if (this.#cork > 0) {
125
+ return
126
+ }
127
+
124
128
  while (this.#arr.length > 0 && (this.#size > this.#maxSize || this.#count > this.#maxCount)) {
125
129
  const e1 = this.#arr[(Math.random() * this.#arr.length) | 0]
126
130
  const e2 = this.#arr[(Math.random() * this.#arr.length) | 0]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/cache",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -30,5 +30,5 @@
30
30
  "tsd": "^0.33.0",
31
31
  "typescript": "^5.9.3"
32
32
  },
33
- "gitHead": "f7c04358e008a7b0f28e2ca76a81ebdc07fbd734"
33
+ "gitHead": "8a59edc35cba6e3bdf43e82710a7cdbf413dc19c"
34
34
  }