Configuration for the CacheInterceptor. Controls TTL, size limits, storage backend, and probabilistic cleanup.
Indexable
Properties
cacheKey?
optional cacheKey: (string | number | object)[];
Cache key
cleanupProbability?
optional cleanupProbability: number;
Probability (0-1) of triggering cleanup on each get operation
enabled?
optional enabled: boolean;
Whether caching is enabled
evictionCheckProbability?
optional evictionCheckProbability: number;
Probability (0-1) of checking total bytes on each write operation
maxBytes?
optional maxBytes: number;
Maximum number of bytes in the cache
maxEntryBytes?
optional maxEntryBytes: number;
Maximum number of bytes per entry in the cache
maxSize?
optional maxSize: number;
Maximum number of entries in the cache
storage?
optional storage: CacheStorage;
Cache Storage provider instance
strictPersistence?
optional strictPersistence: boolean;
Whether to enforce strict persistence
telemetry?
optional telemetry: TelemetryOptions;
Telemetry configuration
ttl?
Time to live in seconds