@abtnode/db-cache 1.17.3-beta-20251119-102907-28b69b76 → 1.17.3-beta-20251121-135300-8e451e6e
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/index.cjs +1 -8
- package/dist/index.mjs +1 -8
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -371,14 +371,7 @@ const _SqliteAdapter = class _SqliteAdapter {
|
|
|
371
371
|
this.prefix = this.opts.prefix;
|
|
372
372
|
this.defaultTtl = this.opts.ttl;
|
|
373
373
|
this.cleanupInterval = this.opts.cleanupInterval ?? 30 * 60 * 1e3;
|
|
374
|
-
|
|
375
|
-
const baseDir = path__namespace.dirname(this.dbPath);
|
|
376
|
-
this.fileLock = new FileLock(baseDir);
|
|
377
|
-
} else {
|
|
378
|
-
const randomId = Math.random().toString(36).substring(2, 15);
|
|
379
|
-
const baseDir = path__namespace.join(os__namespace.tmpdir(), `db-cache-locks-${randomId}`);
|
|
380
|
-
this.fileLock = new FileLock(baseDir);
|
|
381
|
-
}
|
|
374
|
+
this.fileLock = new FileLock(os__namespace.tmpdir());
|
|
382
375
|
}
|
|
383
376
|
if (_SqliteAdapter.clients.has(this.dbPath))
|
|
384
377
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -347,14 +347,7 @@ const _SqliteAdapter = class _SqliteAdapter {
|
|
|
347
347
|
this.prefix = this.opts.prefix;
|
|
348
348
|
this.defaultTtl = this.opts.ttl;
|
|
349
349
|
this.cleanupInterval = this.opts.cleanupInterval ?? 30 * 60 * 1e3;
|
|
350
|
-
|
|
351
|
-
const baseDir = path.dirname(this.dbPath);
|
|
352
|
-
this.fileLock = new FileLock(baseDir);
|
|
353
|
-
} else {
|
|
354
|
-
const randomId = Math.random().toString(36).substring(2, 15);
|
|
355
|
-
const baseDir = path.join(os.tmpdir(), `db-cache-locks-${randomId}`);
|
|
356
|
-
this.fileLock = new FileLock(baseDir);
|
|
357
|
-
}
|
|
350
|
+
this.fileLock = new FileLock(os.tmpdir());
|
|
358
351
|
}
|
|
359
352
|
if (_SqliteAdapter.clients.has(this.dbPath))
|
|
360
353
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/db-cache",
|
|
3
|
-
"version": "1.17.3-beta-
|
|
3
|
+
"version": "1.17.3-beta-20251121-135300-8e451e6e",
|
|
4
4
|
"description": "Db cache use redis or sqlite as backend",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"typescript": "^5.6.3",
|
|
43
43
|
"unbuild": "^2.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e34d7abbe02a8b6eb754b7e2590a9e3d9d663c7d"
|
|
46
46
|
}
|