Logos DX
    Preparing search index...

    Interface EnhancedMemoizedFunction<T>

    Enhanced memoized function with cache management methods.

    interface EnhancedMemoizedFunction<T extends Func | AsyncFunc> {
        cache: {
            clear: () => void;
            delete: (key: string) => boolean;
            entries: () => [string, ReturnType<T> | undefined][];
            has: (key: string) => boolean;
            keys: () => IterableIterator<string>;
            size: number;
            stats: () => CacheStats;
        };
        (...args: Parameters<T>): ReturnType<T>;
    }

    Type Parameters

    Index

    Properties

    Properties

    cache: {
        clear: () => void;
        delete: (key: string) => boolean;
        entries: () => [string, ReturnType<T> | undefined][];
        has: (key: string) => boolean;
        keys: () => IterableIterator<string>;
        size: number;
        stats: () => CacheStats;
    }

    Cache management interface

    Type Declaration

    • clear: () => void

      Clear all cached items and stop background cleanup

    • delete: (key: string) => boolean

      Remove specific item from cache by key

    • entries: () => [string, ReturnType<T> | undefined][]

      All cache entries as key-value pairs

    • has: (key: string) => boolean

      Check if key exists in cache

    • keys: () => IterableIterator<string>

      Iterator of all cache keys

    • Readonlysize: number

      Current number of cached items

    • stats: () => CacheStats

      Get cache performance statistics