Class PersistentValueStore¶
Defined in File cache_manager.hpp
Class Documentation¶
-
class PersistentValueStore¶
Values that survive
CacheManager::reset()across repeated evaluations, keyed by the value’s canonical hash.Owned as a plain value member of the cache handle (see
CacheManager::persistent_values()) — not chained throughparent_, so each handle’s store is local to it, unlike the array-ops and peak-monitor hooks that fall through to the scope-chain parent. It exists so a value whose cell is marked persistent by the table-driven batched executor’s registry (the explicit value cells; seeCellReadResolver, cell_registry.hpp) can be written once and read back across repeated evaluations (e.g. successive CC iterations) without being reconstructed from the per-nodeentrylifetime bookkeeping above, whose persistence flag is scoped to onecache_map_and drained/rebuilt byreset(). The batched executor’s registry is the sole intended writer; readers are the same registry resolving a persistent cell’s operand read.What it holds is the frontier of the invariant region, not all of it: the table marks a cell persistent only when some consumer of it is volatile, or it is a forest root (see
TableCell::persistentanddetail::apply_persistence_frontier), so what accumulates here is the values that feed the next evaluation’s volatile work plus its results — not every invariant intermediate behind them. Nothing here is dropped byreset()by design; its lifetime is bounded byclear_persistent_values()or by the cache handle itself going away.Public Functions
-
inline ResultPtr get(std::size_t hash) const¶
- Returns:
the value stored for
hash, or null if absent.
-
inline bool holds(std::size_t hash) const¶
- Returns:
whether a value is currently stored for
hash.
-
inline void erase(std::size_t hash)¶
Drop the value stored for
hash, if any.
-
inline void clear()¶
Drop every stored value.
-
inline std::size_t size() const¶
- Returns:
the number of values currently stored.
-
inline std::size_t bytes() const¶
- Returns:
the sum of
Result::size_in_bytes()over every stored value.
-
inline ResultPtr get(std::size_t hash) const¶