@stacksjs/cache 0.75.519 → 0.75.522

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.
@@ -127,6 +127,9 @@ declare interface RedisNamespaceSettings {
127
127
  export type CacheBackend = Pick<CacheManager,
128
128
  'get' | 'mget' | 'set' | 'mset' | 'del' | 'has' | 'flush' | 'keys' | 'getTtl' | 'ttl' | 'take' | 'getStats' | 'close' | 'emit'>;
129
129
  export declare class StacksCache implements CacheDriver {
130
+ private manager;
131
+ private inflight;
132
+ private inflightTimeoutMs;
130
133
  constructor(manager: CacheBackend, opts?: { inflightTimeoutMs?: number });
131
134
  get<T>(key: string): Promise<T | undefined>;
132
135
  mget<T>(keys: string[]): Promise<Record<string, T>>;
@@ -173,7 +176,16 @@ export declare class StacksCache implements CacheDriver {
173
176
  * orphaned.
174
177
  */
175
178
  export declare class TaggedCache {
179
+ private static TAG_PREFIX;
180
+ private static flushLocks;
181
+ private cache;
182
+ private tags;
176
183
  constructor(cache: StacksCache, tags: readonly string[]);
184
+ private tagScope;
185
+ private legacyTagKey;
186
+ private serialize;
187
+ private indexKey;
188
+ private indexCachedKey;
177
189
  put<T>(key: string, value: T, ttl?: number): Promise<boolean>;
178
190
  set<T>(key: string, value: T, ttl?: number): Promise<boolean>;
179
191
  setForever<T>(key: string, value: T): Promise<boolean>;
@@ -182,6 +194,7 @@ export declare class TaggedCache {
182
194
  get<T>(key: string): Promise<T | undefined>;
183
195
  has(key: string): Promise<boolean>;
184
196
  flush(): Promise<number>;
197
+ private doFlushOne;
185
198
  }
186
199
  /**
187
200
  * Default cache instance: the driver `config/cache.ts` selects.
@@ -23,7 +23,19 @@ declare interface CacheStatsShape {
23
23
  * subscribe to it the same way on every driver.
24
24
  */
25
25
  export declare class SingleStoreCacheStore extends EventEmitter {
26
+ private sql;
27
+ private table;
28
+ private qualified;
29
+ private prefix;
30
+ private stdTTL;
31
+ private ready;
32
+ private hits;
33
+ private misses;
26
34
  constructor(options?: SingleStoreCacheOptions);
35
+ private ensureReady;
36
+ private k;
37
+ private nowMs;
38
+ private expiryFor;
27
39
  get<T>(key: string): Promise<T | undefined>;
28
40
  mget<T>(keys: string[]): Promise<Record<string, T>>;
29
41
  set<T>(key: string, value: T, ttl?: number): Promise<boolean>;
@@ -39,3 +51,4 @@ export declare class SingleStoreCacheStore extends EventEmitter {
39
51
  getStats(): Promise<CacheStatsShape>;
40
52
  close(): Promise<void>;
41
53
  }
54
+ export {};
@@ -13,7 +13,15 @@ declare interface CacheStatsShape {
13
13
  vsize: number
14
14
  }
15
15
  export declare class SqliteCacheStore extends EventEmitter {
16
+ private db;
17
+ private qualified;
18
+ private prefix;
19
+ private stdTTL;
20
+ private hits;
21
+ private misses;
16
22
  constructor(options?: SqliteCacheOptions);
23
+ private k;
24
+ private expiryFor;
17
25
  get<T>(key: string): Promise<T | undefined>;
18
26
  mget<T>(keys: string[]): Promise<Record<string, T>>;
19
27
  set<T>(key: string, value: T, ttl?: number): Promise<boolean>;
@@ -29,3 +37,4 @@ export declare class SqliteCacheStore extends EventEmitter {
29
37
  getStats(): Promise<CacheStatsShape>;
30
38
  close(): Promise<void>;
31
39
  }
40
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cache",
3
3
  "type": "module",
4
- "version": "0.75.519",
4
+ "version": "0.75.522",
5
5
  "description": "Caching the Stacks way.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -59,7 +59,7 @@
59
59
  "prepublishOnly": "bun run build"
60
60
  },
61
61
  "dependencies": {
62
- "@stacksjs/config": "0.75.519",
62
+ "@stacksjs/config": "0.75.522",
63
63
  "@stacksjs/ts-cache": "^0.1.9"
64
64
  }
65
65
  }