@abtnode/db-cache 1.17.3-beta-20251120-052956-035abea6 → 1.17.3-beta-20251123-232619-53258789

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 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
- if (this.dbPath !== ":memory:") {
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
- if (this.dbPath !== ":memory:") {
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-20251120-052956-035abea6",
3
+ "version": "1.17.3-beta-20251123-232619-53258789",
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": "fe41f1c21bb8e3efcf42623e9b0d24c77563862a"
45
+ "gitHead": "d37497a49c982e82ba60249ed06c1b73f340b893"
46
46
  }