@vicinae/api
    Preparing search index...

    Interface Options

    The options for creating a new Cache.

    interface Options {
        capacity?: number;
        namespace?: string;
        ttl?: number;
    }
    Index

    Properties

    capacity?: number

    The capacity in bytes. If the stored data exceeds the capacity, the least recently used data is removed. The default capacity is 10 MB.

    namespace?: string

    If set, the Cache will be namespaced via a subdirectory. This can be useful to separate the caches for individual commands of an extension. By default, the cache is shared between the commands of an extension.

    ttl?: number

    Default time-to-live in milliseconds for all keys. Individual keys can override this via the ttl option in Cache.set. If not set, keys do not expire, but are still subject to LRU eviction when the cache exceeds its capacity.