toolish - v0.2.5
    Preparing search index...

    Interface TtlCacheOptions<P>

    interface TtlCacheOptions<P extends any[]> {
        ttl: number;
        getKey: (params: P) => string;
    }

    Type Parameters

    • P extends any[]
    Index

    Properties

    Properties

    ttl: number

    Time to live of any cache entry, in milliseconds (i.e. how long data is cached). Set to Number.POSITIVE_INFINITY to never expire. Default: 1 hour.

    getKey: (params: P) => string

    Function used to generate a unique cache key for a given list of loader parameters. Default: JSON.stringify