Logos DX
    Preparing search index...

    Interface CacheAdapter<T>

    Cache adapter interface for pluggable storage backends.

    All methods are async to support Redis, IndexedDB, and other async backends. Adapters handle their own LRU eviction and cleanup logic.

    interface CacheAdapter<T> {
        size: number;
        clear(): Promise<void>;
        delete(key: string): Promise<boolean>;
        get(key: string): Promise<CacheItem<T> | null>;
        has(key: string): Promise<boolean>;
        set(key: string, item: CacheItem<T>, expiresAt?: number): Promise<void>;
    }

    Type Parameters

    • T

      The type of cached values

    Implemented by

    Index

    Properties

    Methods

    Properties

    size: number

    Current number of cached items (may include expired items).

    Methods