moqtail-ts
    Preparing search index...

    Interface ObjectCache

    In‑memory index of MoqtObject instances keyed by their Location (group/subgroup/object), providing ordered insertion and range queries.

    Implementations MUST keep objects sorted ascending by (groupId, objectId) so binary searches can locate insertion points / range bounds efficiently. Subgroup ordinality is currently ignored for ordering (adjust if protocol semantics require finer granularity later).

    const cache: ObjectCache = new MemoryObjectCache()
    cache.add(obj)
    const window = cache.getRange(startLoc, endLoc)
    const exact = cache.getByLocation(loc)

    Concurrency: Implementations here are not thread‑safe; callers avoid concurrent mutation from workers.

    interface ObjectCache {
        add(obj: MoqtObject): void;
        clear(): void;
        getByLocation(location: Location): undefined | MoqtObject;
        getRange(start?: Location, end?: Location): MoqtObject[];
        size(): number;
    }

    Implemented by

    Index

    Methods