Logos DX
    Preparing search index...

    Class MapCacheAdapter<T>

    Map-based cache adapter with LRU eviction and background cleanup.

    Provides cache operations using a Map with:

    • LRU eviction when maxSize is reached
    • Background cleanup of expired entries
    • Access statistics tracking

    All methods are async to conform to CacheAdapter interface, but operations are synchronous internally for performance.

    const adapter = new MapCacheAdapter({ maxSize: 500, cleanupInterval: 30000 });
    await adapter.set('key', item, Date.now() + 60000);
    const cached = await adapter.get('key');

    Type Parameters

    • T

    Implements

    Index

    Constructors

    Accessors

    Methods