zoomy_core.systemmodel.sm_cache#
Cache of built SystemModel objects (memory, user directory, shipped _prebuilt), keyed on the
model spec and the source of every class in its MRO; a model whose source cannot be read is never cached.
Off by default; ZOOMY_DERIVATION_CACHE=1 enables it and ZOOMY_DERIVATION_REBUILD=1 rebuilds.
Module Contents#
Functions#
Cache key of the built |
|
A fresh |
|
Persist |
API#
- zoomy_core.systemmodel.sm_cache.cache_key(model, builder) str | None#
Cache key of the built
SystemModelofmodel(spec, MRO sources, builder source), orNoneif uncacheable. BCs and ICs are runtime data and are not part of the key.
- zoomy_core.systemmodel.sm_cache.fetch(key: str | None)#
A fresh
SystemModelunpickled forkey, orNoneon a miss, disabled cache orkey is None.
- zoomy_core.systemmodel.sm_cache.store(key: str | None, sm) None#
Persist
smunderkeyin memory and the user directory; a no-op forkey is Noneor a disabled cache.