@sudoplatform/sudo-email
    Preparing search index...

    Interface CacheStorageAdapter

    Domain-aware storage adapter for the email message body cache. Each implementation owns its schema, SQL, and storage strategy.

    interface CacheStorageAdapter {
        close(): Promise<void>;
        deleteEntry(messageId: string): Promise<void>;
        evictLRU(incomingBytes: number, cacheSizeLimitBytes: number): Promise<void>;
        flushAll(): Promise<void>;
        flushByEmailAddressId(emailAddressId: string): Promise<void>;
        flushBySudoId(sudoId: string): Promise<void>;
        getCacheSizeLimit(): Promise<number | undefined>;
        getEntry(messageId: string): Promise<CacheEntry | undefined>;
        getTotalSize(): Promise<number>;
        initialize(): Promise<void>;
        putEntry(entry: CacheEntryInput): Promise<void>;
        setCacheSizeLimit(bytes: number): Promise<void>;
    }
    Index
    • Evict least-recently-used entries until there is room for incomingBytes within cacheSizeLimitBytes.

      Parameters

      • incomingBytes: number
      • cacheSizeLimitBytes: number

      Returns Promise<void>