@postgresx/noredis 0.7.1 → 0.7.2
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/dist/{chunk-BD36RDOX.js → chunk-YSQCYFKW.js} +5 -3
- package/dist/index.js +1 -1
- package/dist/kv-cache.js +1 -1
- package/dist/kv.js +1 -1
- package/package.json +1 -1
|
@@ -287,11 +287,13 @@ var PgKvCache = class {
|
|
|
287
287
|
WHERE ctid IN (
|
|
288
288
|
SELECT ctid
|
|
289
289
|
FROM ${this.quotedTableName}
|
|
290
|
-
WHERE
|
|
291
|
-
|
|
290
|
+
WHERE namespace = $1
|
|
291
|
+
AND expires_at IS NOT NULL
|
|
292
|
+
AND expires_at <= NOW()
|
|
293
|
+
LIMIT $2
|
|
292
294
|
)
|
|
293
295
|
RETURNING namespace, key`,
|
|
294
|
-
[Math.max(1, Math.floor(limit))]
|
|
296
|
+
[this.namespace, Math.max(1, Math.floor(limit))]
|
|
295
297
|
);
|
|
296
298
|
for (const row of rows) {
|
|
297
299
|
if (row.namespace === this.namespace) this.deleteL1(row.key);
|
package/dist/index.js
CHANGED
package/dist/kv-cache.js
CHANGED
package/dist/kv.js
CHANGED
package/package.json
CHANGED