UNPKG

529 BTypeScriptView Raw
1/**
2 * Cache instance options
3 */
4export interface CacheConfig {
5 /** Prepend to key to avoid conflicts */
6 keyPrefix: string;
7 /** Cache capacity, in bytes */
8 capacityInBytes: number;
9 /** Max size of one item */
10 itemMaxSize: number;
11 /** Time to live, in milliseconds */
12 defaultTTL: number;
13 /** Warn when over threshold percentage of capacity, maximum 1 */
14 warningThreshold: number;
15 /** default priority number put on cached items */
16 defaultPriority: number;
17 storage?: Storage;
18}