Type Alias ICacheAdapter<TType>

ICacheAdapter<TType>: {
    add(key: string, value: TType, ttl: null | TimeSpan): PromiseLike<boolean>;
    clear(): PromiseLike<void>;
    exists(key: string): PromiseLike<boolean>;
    get(key: string): PromiseLike<null | TType>;
    getGroup(): string;
    increment(key: string, value: number): PromiseLike<boolean>;
    put(key: string, value: TType, ttl: null | TimeSpan): PromiseLike<boolean>;
    remove(key: string): PromiseLike<boolean>;
    update(key: string, value: TType): PromiseLike<boolean>;
    withGroup(group: OneOrMore<string>): ICacheAdapter<TType>;
}

The ICacheAdapter contract defines a way for storing data as key-value pairs independent of data storage. This interface is not meant to be used directly, instead you should use ICache

Type Parameters

  • TType = unknown

Type declaration