Skip to main content

Module global

Module global 

Source
Expand description

Global cross-document LRU storage cap.

Bounds the TOTAL bytes of all documents’ object stores under <data_dir>/docs. When over the ceiling, evict the least-recently-used documents (by their DocMeta.updated_ms) one whole docs/<id>/ subtree at a time until under the cap. The most-recently-used document is never evicted. A document’s .zen source lives outside the store and is untouched — eviction only discards local history, which the next edit re-creates.

Structs§

GlobalCapReport
Report returned by enforce_global_cap.

Functions§

enforce_global_cap
Evict least-recently-used documents until total stored bytes <= max_total_bytes.