Cache instance options

interface CacheConfig {
    capacityInBytes: number;
    defaultPriority: number;
    defaultTTL: number;
    itemMaxSize: number;
    keyPrefix: string;
    storage?: Storage;
    warningThreshold: number;
}

Properties

capacityInBytes: number

Cache capacity, in bytes

defaultPriority: number

default priority number put on cached items

defaultTTL: number

Time to live, in milliseconds

itemMaxSize: number

Max size of one item

keyPrefix: string

Prepend to key to avoid conflicts

storage?: Storage
warningThreshold: number

Warn when over threshold percentage of capacity, maximum 1