Skip to main content

protocol/bounded-map

packages/protocol/src/bounded-map

Purpose

Bounded insertion-ordered map shared by endpoint and server caches. Protocol is the common dependency leaf for client and server runtime packages, so this synchronous store lives in a focused subpath that preserves their one-way imports.

Public surface

BoundedMap

Class
Insertion-ordered map with a fixed entry capacity. Setting an existing key refreshes its position without evicting another entry. Reads preserve insertion order.

Files

  • index.ts