layercache 1.2.6 → 1.2.7

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 CHANGED
@@ -15,7 +15,7 @@
15
15
  <a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache_2.0-green" alt="license"></a>
16
16
  <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-first-3178C6?logo=typescript&logoColor=white" alt="TypeScript"></a>
17
17
  <img src="https://img.shields.io/badge/Node.js-%E2%89%A5_20-339933?logo=nodedotjs&logoColor=white" alt="Node.js >= 20">
18
- <img src="https://img.shields.io/badge/tests-328_passing-brightgreen" alt="tests">
18
+ <img src="https://img.shields.io/badge/tests-393_passing-brightgreen" alt="tests">
19
19
  <a href="https://coveralls.io/github/flyingsquirrel0419/layercache?branch=main"><img src="https://coveralls.io/repos/github/flyingsquirrel0419/layercache/badge.svg?branch=main" alt="Coveralls"></a>
20
20
  </p>
21
21
 
@@ -539,15 +539,10 @@ declare class CacheStack extends EventEmitter {
539
539
  private readonly snapshotSerializer;
540
540
  private readonly backgroundRefreshes;
541
541
  private readonly layerDegradedUntil;
542
- private readonly keyEpochs;
542
+ private readonly maintenance;
543
543
  private readonly ttlResolver;
544
544
  private readonly circuitBreakerManager;
545
545
  private currentGeneration?;
546
- private readonly writeBehindQueue;
547
- private writeBehindTimer?;
548
- private writeBehindFlushPromise?;
549
- private generationCleanupPromise?;
550
- private clearEpoch;
551
546
  private isDisconnecting;
552
547
  private disconnectPromise?;
553
548
  constructor(layers: CacheLayer[], options?: CacheStackOptions);
@@ -659,24 +654,18 @@ declare class CacheStack extends EventEmitter {
659
654
  private sleep;
660
655
  private withTimeout;
661
656
  private shouldBroadcastL1Invalidation;
662
- private shouldCleanupGenerations;
663
- private generationCleanupBatchSize;
664
657
  private scheduleGenerationCleanup;
665
658
  private cleanupGeneration;
666
659
  private initializeWriteBehind;
667
660
  private shouldWriteBehind;
668
- private beginClearEpoch;
669
- private currentKeyEpoch;
670
- private bumpKeyEpochs;
671
- private isWriteOutdated;
672
661
  private enqueueWriteBehind;
673
662
  private flushWriteBehindQueue;
663
+ private runWriteBehindBatch;
674
664
  private buildLayerSetEntry;
675
665
  private intersectKeys;
676
666
  private qualifyKey;
677
667
  private qualifyPattern;
678
668
  private stripQualifiedKey;
679
- private generationPrefix;
680
669
  private deleteKeysFromLayers;
681
670
  private validateConfiguration;
682
671
  private validateWriteOptions;
@@ -539,15 +539,10 @@ declare class CacheStack extends EventEmitter {
539
539
  private readonly snapshotSerializer;
540
540
  private readonly backgroundRefreshes;
541
541
  private readonly layerDegradedUntil;
542
- private readonly keyEpochs;
542
+ private readonly maintenance;
543
543
  private readonly ttlResolver;
544
544
  private readonly circuitBreakerManager;
545
545
  private currentGeneration?;
546
- private readonly writeBehindQueue;
547
- private writeBehindTimer?;
548
- private writeBehindFlushPromise?;
549
- private generationCleanupPromise?;
550
- private clearEpoch;
551
546
  private isDisconnecting;
552
547
  private disconnectPromise?;
553
548
  constructor(layers: CacheLayer[], options?: CacheStackOptions);
@@ -659,24 +654,18 @@ declare class CacheStack extends EventEmitter {
659
654
  private sleep;
660
655
  private withTimeout;
661
656
  private shouldBroadcastL1Invalidation;
662
- private shouldCleanupGenerations;
663
- private generationCleanupBatchSize;
664
657
  private scheduleGenerationCleanup;
665
658
  private cleanupGeneration;
666
659
  private initializeWriteBehind;
667
660
  private shouldWriteBehind;
668
- private beginClearEpoch;
669
- private currentKeyEpoch;
670
- private bumpKeyEpochs;
671
- private isWriteOutdated;
672
661
  private enqueueWriteBehind;
673
662
  private flushWriteBehindQueue;
663
+ private runWriteBehindBatch;
674
664
  private buildLayerSetEntry;
675
665
  private intersectKeys;
676
666
  private qualifyKey;
677
667
  private qualifyPattern;
678
668
  private stripQualifiedKey;
679
- private generationPrefix;
680
669
  private deleteKeysFromLayers;
681
670
  private validateConfiguration;
682
671
  private validateWriteOptions;
package/dist/edge.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- export { e as CacheGetOptions, f as CacheLayer, h as CacheLayerSetManyEntry, t as CacheMetricsSnapshot, w as CacheRateLimitOptions, B as CacheTtlPolicy, D as CacheTtlPolicyContext, J as CacheWriteOptions, K as EvictionPolicy, M as MemoryLayer, N as MemoryLayerOptions, O as MemoryLayerSnapshotEntry, P as PatternMatcher, T as TagIndex, Q as createHonoCacheMiddleware } from './edge-DLstcDMn.cjs';
1
+ export { e as CacheGetOptions, f as CacheLayer, h as CacheLayerSetManyEntry, t as CacheMetricsSnapshot, w as CacheRateLimitOptions, B as CacheTtlPolicy, D as CacheTtlPolicyContext, J as CacheWriteOptions, K as EvictionPolicy, M as MemoryLayer, N as MemoryLayerOptions, O as MemoryLayerSnapshotEntry, P as PatternMatcher, T as TagIndex, Q as createHonoCacheMiddleware } from './edge-BMmPVqaD.cjs';
2
2
  import 'node:events';
package/dist/edge.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { e as CacheGetOptions, f as CacheLayer, h as CacheLayerSetManyEntry, t as CacheMetricsSnapshot, w as CacheRateLimitOptions, B as CacheTtlPolicy, D as CacheTtlPolicyContext, J as CacheWriteOptions, K as EvictionPolicy, M as MemoryLayer, N as MemoryLayerOptions, O as MemoryLayerSnapshotEntry, P as PatternMatcher, T as TagIndex, Q as createHonoCacheMiddleware } from './edge-DLstcDMn.js';
1
+ export { e as CacheGetOptions, f as CacheLayer, h as CacheLayerSetManyEntry, t as CacheMetricsSnapshot, w as CacheRateLimitOptions, B as CacheTtlPolicy, D as CacheTtlPolicyContext, J as CacheWriteOptions, K as EvictionPolicy, M as MemoryLayer, N as MemoryLayerOptions, O as MemoryLayerSnapshotEntry, P as PatternMatcher, T as TagIndex, Q as createHonoCacheMiddleware } from './edge-BMmPVqaD.js';
2
2
  import 'node:events';