Skip to main content
⚠️ AppKit is in an early development phase and is subject to change without notice. DO NOT use in production environments.

# Interface: CacheConfig

Configuration for caching

## Indexable​

    [key: string]: unknown

## 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?​

    optional ttl: number;

Time to live in seconds