layercache 1.2.7 → 1.2.8
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/README.md +4 -4
- package/dist/cli.cjs +12 -1
- package/dist/cli.js +12 -1
- package/dist/{edge-BMmPVqaD.d.cts → edge-DBs8Ko5W.d.cts} +20 -10
- package/dist/{edge-BMmPVqaD.d.ts → edge-DBs8Ko5W.d.ts} +20 -10
- package/dist/edge.d.cts +1 -1
- package/dist/edge.d.ts +1 -1
- package/dist/index.cjs +924 -827
- package/dist/index.d.cts +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +831 -734
- package/package.json +1 -1
- package/packages/nestjs/dist/index.cjs +877 -708
- package/packages/nestjs/dist/index.d.cts +20 -10
- package/packages/nestjs/dist/index.d.ts +20 -10
- package/packages/nestjs/dist/index.js +872 -703
|
@@ -343,6 +343,21 @@ interface CacheStackEvents {
|
|
|
343
343
|
warm: {
|
|
344
344
|
key: string;
|
|
345
345
|
};
|
|
346
|
+
/** Fired immediately before a high-level cache operation begins. */
|
|
347
|
+
'operation-start': {
|
|
348
|
+
id: number;
|
|
349
|
+
name: string;
|
|
350
|
+
attributes?: Record<string, unknown>;
|
|
351
|
+
};
|
|
352
|
+
/** Fired after a high-level cache operation finishes. */
|
|
353
|
+
'operation-end': {
|
|
354
|
+
id: number;
|
|
355
|
+
name: string;
|
|
356
|
+
attributes?: Record<string, unknown>;
|
|
357
|
+
success: boolean;
|
|
358
|
+
result?: 'null';
|
|
359
|
+
error?: unknown;
|
|
360
|
+
};
|
|
346
361
|
/** Fired when an error occurs (layer failure, circuit breaker, etc.). */
|
|
347
362
|
error: {
|
|
348
363
|
operation: string;
|
|
@@ -424,11 +439,15 @@ declare class CacheStack extends EventEmitter {
|
|
|
424
439
|
private readonly keyDiscovery;
|
|
425
440
|
private readonly fetchRateLimiter;
|
|
426
441
|
private readonly snapshotSerializer;
|
|
442
|
+
private readonly invalidation;
|
|
443
|
+
private readonly layerWriter;
|
|
444
|
+
private readonly snapshots;
|
|
427
445
|
private readonly backgroundRefreshes;
|
|
428
446
|
private readonly layerDegradedUntil;
|
|
429
447
|
private readonly maintenance;
|
|
430
448
|
private readonly ttlResolver;
|
|
431
449
|
private readonly circuitBreakerManager;
|
|
450
|
+
private nextOperationId;
|
|
432
451
|
private currentGeneration?;
|
|
433
452
|
private isDisconnecting;
|
|
434
453
|
private disconnectPromise?;
|
|
@@ -525,8 +544,6 @@ declare class CacheStack extends EventEmitter {
|
|
|
525
544
|
private readFromLayers;
|
|
526
545
|
private readLayerEntry;
|
|
527
546
|
private backfill;
|
|
528
|
-
private writeAcrossLayers;
|
|
529
|
-
private executeLayerOperations;
|
|
530
547
|
private resolveFreshTtl;
|
|
531
548
|
private resolveLayerSeconds;
|
|
532
549
|
private shouldNegativeCache;
|
|
@@ -541,6 +558,7 @@ declare class CacheStack extends EventEmitter {
|
|
|
541
558
|
private sleep;
|
|
542
559
|
private withTimeout;
|
|
543
560
|
private shouldBroadcastL1Invalidation;
|
|
561
|
+
private observeOperation;
|
|
544
562
|
private scheduleGenerationCleanup;
|
|
545
563
|
private cleanupGeneration;
|
|
546
564
|
private initializeWriteBehind;
|
|
@@ -548,12 +566,9 @@ declare class CacheStack extends EventEmitter {
|
|
|
548
566
|
private enqueueWriteBehind;
|
|
549
567
|
private flushWriteBehindQueue;
|
|
550
568
|
private runWriteBehindBatch;
|
|
551
|
-
private buildLayerSetEntry;
|
|
552
|
-
private intersectKeys;
|
|
553
569
|
private qualifyKey;
|
|
554
570
|
private qualifyPattern;
|
|
555
571
|
private stripQualifiedKey;
|
|
556
|
-
private deleteKeysFromLayers;
|
|
557
572
|
private validateConfiguration;
|
|
558
573
|
private validateWriteOptions;
|
|
559
574
|
private assertActive;
|
|
@@ -566,14 +581,9 @@ declare class CacheStack extends EventEmitter {
|
|
|
566
581
|
private recordCircuitFailure;
|
|
567
582
|
private isNegativeStoredValue;
|
|
568
583
|
private emitError;
|
|
569
|
-
private isCacheSnapshotEntries;
|
|
570
|
-
private sanitizeSnapshotValue;
|
|
571
584
|
private snapshotMaxBytes;
|
|
572
585
|
private snapshotMaxEntries;
|
|
573
586
|
private invalidationMaxKeys;
|
|
574
|
-
private collectKeysForTag;
|
|
575
|
-
private assertWithinInvalidationKeyLimit;
|
|
576
|
-
private visitExportEntries;
|
|
577
587
|
}
|
|
578
588
|
|
|
579
589
|
interface CacheableOptions<TArgs extends unknown[]> extends CacheWrapOptions<TArgs> {
|
|
@@ -343,6 +343,21 @@ interface CacheStackEvents {
|
|
|
343
343
|
warm: {
|
|
344
344
|
key: string;
|
|
345
345
|
};
|
|
346
|
+
/** Fired immediately before a high-level cache operation begins. */
|
|
347
|
+
'operation-start': {
|
|
348
|
+
id: number;
|
|
349
|
+
name: string;
|
|
350
|
+
attributes?: Record<string, unknown>;
|
|
351
|
+
};
|
|
352
|
+
/** Fired after a high-level cache operation finishes. */
|
|
353
|
+
'operation-end': {
|
|
354
|
+
id: number;
|
|
355
|
+
name: string;
|
|
356
|
+
attributes?: Record<string, unknown>;
|
|
357
|
+
success: boolean;
|
|
358
|
+
result?: 'null';
|
|
359
|
+
error?: unknown;
|
|
360
|
+
};
|
|
346
361
|
/** Fired when an error occurs (layer failure, circuit breaker, etc.). */
|
|
347
362
|
error: {
|
|
348
363
|
operation: string;
|
|
@@ -424,11 +439,15 @@ declare class CacheStack extends EventEmitter {
|
|
|
424
439
|
private readonly keyDiscovery;
|
|
425
440
|
private readonly fetchRateLimiter;
|
|
426
441
|
private readonly snapshotSerializer;
|
|
442
|
+
private readonly invalidation;
|
|
443
|
+
private readonly layerWriter;
|
|
444
|
+
private readonly snapshots;
|
|
427
445
|
private readonly backgroundRefreshes;
|
|
428
446
|
private readonly layerDegradedUntil;
|
|
429
447
|
private readonly maintenance;
|
|
430
448
|
private readonly ttlResolver;
|
|
431
449
|
private readonly circuitBreakerManager;
|
|
450
|
+
private nextOperationId;
|
|
432
451
|
private currentGeneration?;
|
|
433
452
|
private isDisconnecting;
|
|
434
453
|
private disconnectPromise?;
|
|
@@ -525,8 +544,6 @@ declare class CacheStack extends EventEmitter {
|
|
|
525
544
|
private readFromLayers;
|
|
526
545
|
private readLayerEntry;
|
|
527
546
|
private backfill;
|
|
528
|
-
private writeAcrossLayers;
|
|
529
|
-
private executeLayerOperations;
|
|
530
547
|
private resolveFreshTtl;
|
|
531
548
|
private resolveLayerSeconds;
|
|
532
549
|
private shouldNegativeCache;
|
|
@@ -541,6 +558,7 @@ declare class CacheStack extends EventEmitter {
|
|
|
541
558
|
private sleep;
|
|
542
559
|
private withTimeout;
|
|
543
560
|
private shouldBroadcastL1Invalidation;
|
|
561
|
+
private observeOperation;
|
|
544
562
|
private scheduleGenerationCleanup;
|
|
545
563
|
private cleanupGeneration;
|
|
546
564
|
private initializeWriteBehind;
|
|
@@ -548,12 +566,9 @@ declare class CacheStack extends EventEmitter {
|
|
|
548
566
|
private enqueueWriteBehind;
|
|
549
567
|
private flushWriteBehindQueue;
|
|
550
568
|
private runWriteBehindBatch;
|
|
551
|
-
private buildLayerSetEntry;
|
|
552
|
-
private intersectKeys;
|
|
553
569
|
private qualifyKey;
|
|
554
570
|
private qualifyPattern;
|
|
555
571
|
private stripQualifiedKey;
|
|
556
|
-
private deleteKeysFromLayers;
|
|
557
572
|
private validateConfiguration;
|
|
558
573
|
private validateWriteOptions;
|
|
559
574
|
private assertActive;
|
|
@@ -566,14 +581,9 @@ declare class CacheStack extends EventEmitter {
|
|
|
566
581
|
private recordCircuitFailure;
|
|
567
582
|
private isNegativeStoredValue;
|
|
568
583
|
private emitError;
|
|
569
|
-
private isCacheSnapshotEntries;
|
|
570
|
-
private sanitizeSnapshotValue;
|
|
571
584
|
private snapshotMaxBytes;
|
|
572
585
|
private snapshotMaxEntries;
|
|
573
586
|
private invalidationMaxKeys;
|
|
574
|
-
private collectKeysForTag;
|
|
575
|
-
private assertWithinInvalidationKeyLimit;
|
|
576
|
-
private visitExportEntries;
|
|
577
587
|
}
|
|
578
588
|
|
|
579
589
|
interface CacheableOptions<TArgs extends unknown[]> extends CacheWrapOptions<TArgs> {
|