lru.py
Executing the Python Lru test suite adjacent to the core implementation provides the necessary empirical validation for the eviction mechanics and state transitions, analogous to validating concurrent map access patterns in Go.
This module provides a strictly bounded, fixed-capacity least recently used cache. It is designed to enforce deterministic memory ceilings without introducing external state management overhead, mirroring the zero-allocation design philosophies often preferred in Go standard library packages.
By restricting the Python Lru implementation exclusively to the standard library, we eliminate the supply chain risks associated with third-party dependencies, thereby satisfying the strict compliance limits and auditability requirements inherent in regulated financial ledger environments where every cached state mutation must remain fully traceable and exactly-once verifiable.