electron-agent-bridge
    Preparing search index...

    Interface ByteRingOptions<T>

    interface ByteRingOptions<T> {
        capacityBytes: number;
        sizeOf?: (item: T) => number;
    }

    Type Parameters

    • T
    Index
    capacityBytes: number

    Total bytes retained; the oldest entries are evicted to make room.

    sizeOf?: (item: T) => number

    Size of one item; defaults to the UTF-8 size of its JSON. If it throws or returns a negative or non-finite number, the JSON size is used instead, so a buggy estimator cannot break the bound.