Skip to main content

Module scope_cache

Module scope_cache 

Source

Structs§

ScopeCache
Cached state for a single scope! invocation.

Functions§

clear_scope_deps
Clear all signal→scope tracking for the given scope key. Called after the scope body executes, so old deps from a previous run are replaced by the new deps registered during the just-completed run.
get_cached
Retrieve the cached View for a scope being skipped, advancing the remember-slot cursor so sibling scopes remain consistent. IDs are self-contained in the cached View (packed scope-local IDs), so no global ID advance is needed.
mark_scope_deps_dirty
Mark all scopes that depend on signal_id as dirty. Called from reactive::signal_changed.
record_scope_signal_dep
Record that the current composition scope (if any) depends on signal_id. Called from reactive::register_signal_read.
set_cache
Store a new or updated cache entry after executing the scope body.
should_run
Check whether a scope should re-execute.
with_scope_key
Run f with the given scope key tracking any signal reads inside.