lakutata 2.0.39 → 2.0.41

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/com/cacher.cjs CHANGED
@@ -8,25 +8,25 @@ require("../vendor/Package.4.cjs");
8
8
 
9
9
  const e = require("../src/components/cacher/Cacher.cjs");
10
10
 
11
- const r = require("../src/components/cacher/options/CacherOptions.cjs");
11
+ require("../src/components/cacher/interfaces/CacherOptions.cjs");
12
12
 
13
- const c = require("../src/components/cacher/options/FileCacheOptions.cjs");
13
+ const r = require("../src/components/cacher/options/FileCacheOptions.cjs");
14
14
 
15
- const s = require("../src/components/cacher/options/MemcacheCacheOptions.cjs");
15
+ const c = require("../src/components/cacher/options/MemcacheCacheOptions.cjs");
16
16
 
17
- const i = require("../src/components/cacher/options/MongoCacheOptions.cjs");
17
+ const s = require("../src/components/cacher/options/MongoCacheOptions.cjs");
18
18
 
19
- const o = require("../src/components/cacher/options/MysqlCacheOptions.cjs");
19
+ const i = require("../src/components/cacher/options/MysqlCacheOptions.cjs");
20
20
 
21
- const t = require("../src/components/cacher/options/PostgresCacheOptions.cjs");
21
+ const o = require("../src/components/cacher/options/PostgresCacheOptions.cjs");
22
22
 
23
- const n = require("../src/components/cacher/options/RedisCacheOptions.cjs");
23
+ const t = require("../src/components/cacher/options/RedisCacheOptions.cjs");
24
24
 
25
- const a = require("../src/components/cacher/options/SqliteCacheOptions.cjs");
25
+ const n = require("../src/components/cacher/options/SqliteCacheOptions.cjs");
26
26
 
27
27
  require("../src/components/cacher/types/CacheStoreOptions.cjs");
28
28
 
29
- const u = require("../src/components/cacher/exceptions/CacheDriverNotFoundException.cjs");
29
+ const a = require("../src/components/cacher/exceptions/CacheDriverNotFoundException.cjs");
30
30
 
31
31
  require("../vendor/Package.5.cjs");
32
32
 
@@ -216,20 +216,18 @@ exports.BuildCacherOptions = e.BuildCacherOptions;
216
216
 
217
217
  exports.Cacher = e.Cacher;
218
218
 
219
- exports.CacherOptions = r.CacherOptions;
219
+ exports.FileCacheOptions = r.FileCacheOptions;
220
220
 
221
- exports.FileCacheOptions = c.FileCacheOptions;
221
+ exports.MemcacheCacheOptions = c.MemcacheCacheOptions;
222
222
 
223
- exports.MemcacheCacheOptions = s.MemcacheCacheOptions;
223
+ exports.MongoCacheOptions = s.MongoCacheOptions;
224
224
 
225
- exports.MongoCacheOptions = i.MongoCacheOptions;
225
+ exports.MysqlCacheOptions = i.MysqlCacheOptions;
226
226
 
227
- exports.MysqlCacheOptions = o.MysqlCacheOptions;
227
+ exports.PostgresCacheOptions = o.PostgresCacheOptions;
228
228
 
229
- exports.PostgresCacheOptions = t.PostgresCacheOptions;
229
+ exports.RedisCacheOptions = t.RedisCacheOptions;
230
230
 
231
- exports.RedisCacheOptions = n.RedisCacheOptions;
231
+ exports.SqliteCacheOptions = n.SqliteCacheOptions;
232
232
 
233
- exports.SqliteCacheOptions = a.SqliteCacheOptions;
234
-
235
- exports.CacheDriverNotFoundException = u.CacheDriverNotFoundException;
233
+ exports.CacheDriverNotFoundException = a.CacheDriverNotFoundException;
package/com/cacher.d.ts CHANGED
@@ -460,7 +460,7 @@ declare class MemcacheCacheOptions extends DTO {
460
460
 
461
461
  type CacheStoreOptions = FileCacheOptions | RedisCacheOptions | MemcacheCacheOptions | MongoCacheOptions | SqliteCacheOptions | PostgresCacheOptions | MysqlCacheOptions;
462
462
 
463
- declare class CacherOptions extends DTO {
463
+ interface CacherOptions {
464
464
  stores?: CacheStoreOptions[] | CacheStoreOptions;
465
465
  ttl?: number;
466
466
  refreshThreshold?: number;
@@ -471,7 +471,12 @@ declare class CacherOptions extends DTO {
471
471
 
472
472
  declare const BuildCacherOptions: (options?: CacherOptions) => {
473
473
  class: typeof Cacher;
474
- options?: CacherOptions;
474
+ stores?: CacheStoreOptions[] | CacheStoreOptions;
475
+ ttl?: number;
476
+ refreshThreshold?: number;
477
+ refreshAllStores?: boolean;
478
+ nonBlocking?: boolean;
479
+ cacheId?: string;
475
480
  };
476
481
  type MultipleSetInput = {
477
482
  key: string;
@@ -493,7 +498,12 @@ type OnRefreshEventData = {
493
498
  error?: Error;
494
499
  };
495
500
  declare class Cacher extends Component {
496
- protected readonly options?: CacherOptions;
501
+ protected readonly stores?: CacheStoreOptions[] | CacheStoreOptions;
502
+ protected readonly ttl?: number;
503
+ protected readonly refreshThreshold?: number;
504
+ protected readonly refreshAllStores?: boolean;
505
+ protected readonly nonBlocking?: boolean;
506
+ protected readonly cacheId?: string;
497
507
  protected cache: Cache;
498
508
  protected init(): Promise<void>;
499
509
  protected destroy(): Promise<void>;
@@ -501,7 +511,7 @@ declare class Cacher extends Component {
501
511
  multipleSet(options: MultipleSetInput[]): Promise<MultipleSetInput[]>;
502
512
  get<T = any>(key: string): Promise<T>;
503
513
  multipleGet(keys: string[]): Promise<any[]>;
504
- ttl(key: string): Promise<number>;
514
+ getTTL(key: string): Promise<number>;
505
515
  del(key: string): Promise<boolean>;
506
516
  multipleDel(keys: string[]): Promise<boolean>;
507
517
  clear(): Promise<boolean>;
@@ -515,5 +525,5 @@ declare class CacheDriverNotFoundException extends Exception {
515
525
  errno: string | number;
516
526
  }
517
527
 
518
- export { BuildCacherOptions, CacheDriverNotFoundException, Cacher, CacherOptions, FileCacheOptions, MemcacheCacheOptions, MongoCacheOptions, MysqlCacheOptions, PostgresCacheOptions, RedisCacheOptions, SqliteCacheOptions };
519
- export type { CacheStoreOptions, MultipleSetInput, OnDelEventData, OnRefreshEventData, OnSetEventData };
528
+ export { BuildCacherOptions, CacheDriverNotFoundException, Cacher, FileCacheOptions, MemcacheCacheOptions, MongoCacheOptions, MysqlCacheOptions, PostgresCacheOptions, RedisCacheOptions, SqliteCacheOptions };
529
+ export type { CacheStoreOptions, CacherOptions, MultipleSetInput, OnDelEventData, OnRefreshEventData, OnSetEventData };
package/com/cacher.mjs CHANGED
@@ -2,7 +2,7 @@ import "../vendor/Package.4.mjs";
2
2
 
3
3
  export { BuildCacherOptions, Cacher } from "../src/components/cacher/Cacher.mjs";
4
4
 
5
- export { CacherOptions } from "../src/components/cacher/options/CacherOptions.mjs";
5
+ import "../src/components/cacher/interfaces/CacherOptions.mjs";
6
6
 
7
7
  export { FileCacheOptions } from "../src/components/cacher/options/FileCacheOptions.mjs";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lakutata",
3
- "version": "2.0.39",
3
+ "version": "2.0.41",
4
4
  "description": "An IoC-based universal application framework.",
5
5
  "exports": {
6
6
  ".": {