simvx.core.assets.cache¶
Byte-budget LRU cache used by typed loaders.
Keys are (uri, version) so the same URI with a new version (etag,
mtime) becomes a fresh entry; consumers don’t need explicit invalidation
to pick up updated content.
Module Contents¶
Classes¶
Simple byte-budget LRU. |
API¶
- class simvx.core.assets.cache.LRUCache(max_bytes: int)[source]¶
Simple byte-budget LRU.
Estimates per-entry size via
sys.getsizeoffor bytes-like values and falls back to a constant for arbitrary objects. Loaders that cache structured assets (textures, sounds) should passsize_hintso eviction tracks GPU/audio memory rather than the Python wrapper.Initialization