Skip to main content

Module cache

Module cache 

Source
Expand description

Plan cache with space-topology-based invalidation.

ObsPlanCache wraps an ObsSpec and lazily compiles an ObsPlan on first use. Subsequent calls to ObsPlanCache::get_or_compile return the cached plan as long as the same space instance (by SpaceInstanceId and cell count) is provided; otherwise the plan is recompiled automatically.

The cache does not key on WorldGenerationId because that counter increments on every tick, which would defeat caching. Observation plans depend only on space topology (cell count, canonical ordering), not on per-tick state.

Structsยง

ObsPlanCache
Cached observation plan with space-topology-based invalidation.