Type Alias IReadableCache<TType>

IReadableCache: {
    exists(key: string): ITask<boolean>;
    get(key: string): ITask<null | TType>;
    getOr(
        key: string,
        defaultValue: AsyncLazyable<NoneFunc<TType>>,
    ): ITask<TType>;
    getOrFail(key: string): ITask<TType>;
    missing(key: string): ITask<boolean>;
}

The IReadableCache contract defines a way reading for as key-value pairs independent of data storage.

IMPORT_PATH: "@daiso-tech/core/cache/contracts"

Type Parameters

  • TType = unknown

Type declaration