@xbg.solutions/utils-cache-connector 1.0.0
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/lib/cache-connector.d.ts +139 -0
- package/lib/cache-connector.d.ts.map +1 -0
- package/lib/cache-connector.js +277 -0
- package/lib/cache-connector.js.map +1 -0
- package/lib/index.d.ts +52 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +103 -0
- package/lib/index.js.map +1 -0
- package/lib/providers/base-cache-provider.d.ts +95 -0
- package/lib/providers/base-cache-provider.d.ts.map +1 -0
- package/lib/providers/base-cache-provider.js +120 -0
- package/lib/providers/base-cache-provider.js.map +1 -0
- package/lib/providers/firestore-cache-provider.d.ts +58 -0
- package/lib/providers/firestore-cache-provider.d.ts.map +1 -0
- package/lib/providers/firestore-cache-provider.js +418 -0
- package/lib/providers/firestore-cache-provider.js.map +1 -0
- package/lib/providers/memory-cache-provider.d.ts +57 -0
- package/lib/providers/memory-cache-provider.d.ts.map +1 -0
- package/lib/providers/memory-cache-provider.js +217 -0
- package/lib/providers/memory-cache-provider.js.map +1 -0
- package/lib/providers/noop-cache-provider.d.ts +21 -0
- package/lib/providers/noop-cache-provider.d.ts.map +1 -0
- package/lib/providers/noop-cache-provider.js +42 -0
- package/lib/providers/noop-cache-provider.js.map +1 -0
- package/lib/providers/redis-cache-provider.d.ts +64 -0
- package/lib/providers/redis-cache-provider.d.ts.map +1 -0
- package/lib/providers/redis-cache-provider.js +414 -0
- package/lib/providers/redis-cache-provider.js.map +1 -0
- package/lib/types.d.ts +342 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +8 -0
- package/lib/types.js.map +1 -0
- package/package.json +31 -0
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache Connector Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Defines the types and interfaces for the multi-level caching system.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Supported cache provider types
|
|
8
|
+
*/
|
|
9
|
+
export type CacheProviderType = 'memory' | 'firestore' | 'redis' | 'noop';
|
|
10
|
+
/**
|
|
11
|
+
* Cache strategies for advanced behavior
|
|
12
|
+
*/
|
|
13
|
+
export type CacheStrategy = 'write-through' | 'write-behind' | 'cache-aside' | 'refresh-ahead';
|
|
14
|
+
/**
|
|
15
|
+
* Global cache configuration (project-level)
|
|
16
|
+
*/
|
|
17
|
+
export interface CacheConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Master switch - if false, all caching is disabled
|
|
20
|
+
*/
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Default provider for repositories that don't specify
|
|
24
|
+
*/
|
|
25
|
+
defaultProvider: CacheProviderType;
|
|
26
|
+
/**
|
|
27
|
+
* Default TTL in seconds
|
|
28
|
+
*/
|
|
29
|
+
defaultTTL: number;
|
|
30
|
+
/**
|
|
31
|
+
* Global cache namespace (for versioning)
|
|
32
|
+
* Change this to invalidate all cached data
|
|
33
|
+
*/
|
|
34
|
+
namespace: string;
|
|
35
|
+
/**
|
|
36
|
+
* Provider-specific configurations
|
|
37
|
+
*/
|
|
38
|
+
providers: {
|
|
39
|
+
memory: MemoryCacheProviderConfig;
|
|
40
|
+
firestore: FirestoreCacheProviderConfig;
|
|
41
|
+
redis?: RedisCacheProviderConfig;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Memory cache provider configuration
|
|
46
|
+
*/
|
|
47
|
+
export interface MemoryCacheProviderConfig {
|
|
48
|
+
/**
|
|
49
|
+
* Maximum cache size in bytes
|
|
50
|
+
*/
|
|
51
|
+
maxSize: number;
|
|
52
|
+
/**
|
|
53
|
+
* Interval to check for expired entries (seconds)
|
|
54
|
+
*/
|
|
55
|
+
checkPeriod: number;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to use LRU eviction when max size is reached
|
|
58
|
+
*/
|
|
59
|
+
useClones?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Firestore cache provider configuration
|
|
63
|
+
*/
|
|
64
|
+
export interface FirestoreCacheProviderConfig {
|
|
65
|
+
/**
|
|
66
|
+
* Which database to use for cache storage
|
|
67
|
+
*/
|
|
68
|
+
database: string;
|
|
69
|
+
/**
|
|
70
|
+
* Collection name for cache entries
|
|
71
|
+
*/
|
|
72
|
+
collection: string;
|
|
73
|
+
/**
|
|
74
|
+
* Enable automatic cleanup of expired entries
|
|
75
|
+
*/
|
|
76
|
+
enableCleanup: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Cleanup interval in seconds
|
|
79
|
+
*/
|
|
80
|
+
cleanupInterval: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Redis cache provider configuration
|
|
84
|
+
*/
|
|
85
|
+
export interface RedisCacheProviderConfig {
|
|
86
|
+
/**
|
|
87
|
+
* Redis server host
|
|
88
|
+
*/
|
|
89
|
+
host: string;
|
|
90
|
+
/**
|
|
91
|
+
* Redis server port
|
|
92
|
+
*/
|
|
93
|
+
port: number;
|
|
94
|
+
/**
|
|
95
|
+
* Redis password (optional)
|
|
96
|
+
*/
|
|
97
|
+
password?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Redis database number
|
|
100
|
+
*/
|
|
101
|
+
db: number;
|
|
102
|
+
/**
|
|
103
|
+
* Connection timeout in milliseconds
|
|
104
|
+
*/
|
|
105
|
+
connectTimeout?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Enable TLS
|
|
108
|
+
*/
|
|
109
|
+
tls?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Repository-level cache configuration
|
|
113
|
+
*/
|
|
114
|
+
export interface RepositoryCacheConfig {
|
|
115
|
+
/**
|
|
116
|
+
* Enable caching for this repository (only if global is enabled)
|
|
117
|
+
*/
|
|
118
|
+
enabled: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Which provider to use (overrides global default)
|
|
121
|
+
*/
|
|
122
|
+
provider?: CacheProviderType;
|
|
123
|
+
/**
|
|
124
|
+
* Default TTL for this repository (overrides global default)
|
|
125
|
+
*/
|
|
126
|
+
ttl?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Cache key prefix for this repository
|
|
129
|
+
*/
|
|
130
|
+
keyPrefix?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Invalidation tags (auto-applied to all cache entries)
|
|
133
|
+
*/
|
|
134
|
+
tags?: string[];
|
|
135
|
+
/**
|
|
136
|
+
* Advanced: cache strategies
|
|
137
|
+
*/
|
|
138
|
+
strategies?: CacheStrategy[];
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Method-level cache options (runtime)
|
|
142
|
+
*/
|
|
143
|
+
export interface CacheOptions {
|
|
144
|
+
/**
|
|
145
|
+
* Time-to-live override in seconds
|
|
146
|
+
*/
|
|
147
|
+
ttl?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Tags for cache invalidation
|
|
150
|
+
*/
|
|
151
|
+
tags?: string[];
|
|
152
|
+
/**
|
|
153
|
+
* Force refresh, skip cache lookup
|
|
154
|
+
*/
|
|
155
|
+
forceRefresh?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Additional metadata for debugging
|
|
158
|
+
*/
|
|
159
|
+
metadata?: Record<string, any>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Options for setting cache entries
|
|
163
|
+
*/
|
|
164
|
+
export interface CacheSetOptions extends CacheOptions {
|
|
165
|
+
/**
|
|
166
|
+
* Provider to use for this operation
|
|
167
|
+
*/
|
|
168
|
+
provider?: CacheProviderType;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Options for getting cache entries
|
|
172
|
+
*/
|
|
173
|
+
export interface CacheGetOptions {
|
|
174
|
+
/**
|
|
175
|
+
* Provider to use for this operation
|
|
176
|
+
*/
|
|
177
|
+
provider?: CacheProviderType;
|
|
178
|
+
/**
|
|
179
|
+
* Return metadata along with value
|
|
180
|
+
*/
|
|
181
|
+
includeMetadata?: boolean;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Options for invalidation operations
|
|
185
|
+
*/
|
|
186
|
+
export interface CacheInvalidateOptions {
|
|
187
|
+
/**
|
|
188
|
+
* Provider to use for this operation
|
|
189
|
+
*/
|
|
190
|
+
provider?: CacheProviderType;
|
|
191
|
+
/**
|
|
192
|
+
* Pattern matching mode
|
|
193
|
+
*/
|
|
194
|
+
pattern?: 'exact' | 'prefix' | 'suffix' | 'contains';
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Cache entry metadata
|
|
198
|
+
*/
|
|
199
|
+
export interface CacheEntryMetadata {
|
|
200
|
+
/**
|
|
201
|
+
* When the entry was created
|
|
202
|
+
*/
|
|
203
|
+
createdAt: Date;
|
|
204
|
+
/**
|
|
205
|
+
* When the entry expires
|
|
206
|
+
*/
|
|
207
|
+
expiresAt: Date;
|
|
208
|
+
/**
|
|
209
|
+
* Number of times this entry has been accessed
|
|
210
|
+
*/
|
|
211
|
+
hitCount: number;
|
|
212
|
+
/**
|
|
213
|
+
* Last access timestamp
|
|
214
|
+
*/
|
|
215
|
+
lastAccessedAt: Date;
|
|
216
|
+
/**
|
|
217
|
+
* Tags associated with this entry
|
|
218
|
+
*/
|
|
219
|
+
tags: string[];
|
|
220
|
+
/**
|
|
221
|
+
* Size in bytes (approximate)
|
|
222
|
+
*/
|
|
223
|
+
size?: number;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Cache entry with metadata
|
|
227
|
+
*/
|
|
228
|
+
export interface CacheEntry<T = any> {
|
|
229
|
+
/**
|
|
230
|
+
* Cache key
|
|
231
|
+
*/
|
|
232
|
+
key: string;
|
|
233
|
+
/**
|
|
234
|
+
* Cached value
|
|
235
|
+
*/
|
|
236
|
+
value: T;
|
|
237
|
+
/**
|
|
238
|
+
* Entry metadata
|
|
239
|
+
*/
|
|
240
|
+
metadata: CacheEntryMetadata;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Cache statistics
|
|
244
|
+
*/
|
|
245
|
+
export interface CacheStats {
|
|
246
|
+
/**
|
|
247
|
+
* Total number of cache hits
|
|
248
|
+
*/
|
|
249
|
+
hits: number;
|
|
250
|
+
/**
|
|
251
|
+
* Total number of cache misses
|
|
252
|
+
*/
|
|
253
|
+
misses: number;
|
|
254
|
+
/**
|
|
255
|
+
* Hit ratio (hits / (hits + misses))
|
|
256
|
+
*/
|
|
257
|
+
hitRatio: number;
|
|
258
|
+
/**
|
|
259
|
+
* Total number of entries in cache
|
|
260
|
+
*/
|
|
261
|
+
entryCount: number;
|
|
262
|
+
/**
|
|
263
|
+
* Total size of cache in bytes
|
|
264
|
+
*/
|
|
265
|
+
size: number;
|
|
266
|
+
/**
|
|
267
|
+
* Number of evictions (LRU or size-based)
|
|
268
|
+
*/
|
|
269
|
+
evictions: number;
|
|
270
|
+
/**
|
|
271
|
+
* Number of expirations
|
|
272
|
+
*/
|
|
273
|
+
expirations: number;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Cache operation result
|
|
277
|
+
*/
|
|
278
|
+
export interface CacheOperationResult {
|
|
279
|
+
/**
|
|
280
|
+
* Whether the operation succeeded
|
|
281
|
+
*/
|
|
282
|
+
success: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Error message if operation failed
|
|
285
|
+
*/
|
|
286
|
+
error?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Operation duration in milliseconds
|
|
289
|
+
*/
|
|
290
|
+
duration?: number;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Base cache provider interface
|
|
294
|
+
* All cache providers must implement this interface
|
|
295
|
+
*/
|
|
296
|
+
export interface ICacheProvider {
|
|
297
|
+
/**
|
|
298
|
+
* Get a value from cache
|
|
299
|
+
*/
|
|
300
|
+
get<T>(key: string): Promise<T | null>;
|
|
301
|
+
/**
|
|
302
|
+
* Get a value with metadata
|
|
303
|
+
*/
|
|
304
|
+
getWithMetadata<T>(key: string): Promise<CacheEntry<T> | null>;
|
|
305
|
+
/**
|
|
306
|
+
* Set a value in cache
|
|
307
|
+
*/
|
|
308
|
+
set<T>(key: string, value: T, options?: CacheSetOptions): Promise<void>;
|
|
309
|
+
/**
|
|
310
|
+
* Delete a specific key
|
|
311
|
+
*/
|
|
312
|
+
delete(key: string): Promise<boolean>;
|
|
313
|
+
/**
|
|
314
|
+
* Check if a key exists
|
|
315
|
+
*/
|
|
316
|
+
has(key: string): Promise<boolean>;
|
|
317
|
+
/**
|
|
318
|
+
* Invalidate cache entries by tags
|
|
319
|
+
*/
|
|
320
|
+
invalidateByTags(tags: string[]): Promise<number>;
|
|
321
|
+
/**
|
|
322
|
+
* Invalidate cache entries by pattern
|
|
323
|
+
*/
|
|
324
|
+
invalidateByPattern(pattern: string, mode?: 'prefix' | 'suffix' | 'contains'): Promise<number>;
|
|
325
|
+
/**
|
|
326
|
+
* Clear all cache entries
|
|
327
|
+
*/
|
|
328
|
+
clear(): Promise<void>;
|
|
329
|
+
/**
|
|
330
|
+
* Get cache statistics
|
|
331
|
+
*/
|
|
332
|
+
getStats(): Promise<CacheStats>;
|
|
333
|
+
/**
|
|
334
|
+
* Get the provider type
|
|
335
|
+
*/
|
|
336
|
+
getType(): CacheProviderType;
|
|
337
|
+
/**
|
|
338
|
+
* Cleanup expired entries (if supported)
|
|
339
|
+
*/
|
|
340
|
+
cleanup?(): Promise<number>;
|
|
341
|
+
}
|
|
342
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,eAAe,GACf,cAAc,GACd,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EtC;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElD;;OAEG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/F;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAEhC;;OAEG;IACH,OAAO,IAAI,iBAAiB,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B"}
|
package/lib/types.js
ADDED
package/lib/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xbg.solutions/utils-cache-connector",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Multi-provider caching (memory, Firestore, Redis)",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"build:watch": "tsc --watch",
|
|
13
|
+
"clean": "rm -rf lib",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@xbg/utils-logger": "^1.0.0",
|
|
18
|
+
"firebase-admin": "^12.0.0",
|
|
19
|
+
"ioredis": "^5.3.2"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^20.11.0",
|
|
23
|
+
"typescript": "^5.3.3"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": "22"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
}
|
|
31
|
+
}
|