Notify direct reverse dependencies when an Element becomes ready for runtime and cached
Description
!1344 (merged) implemented a new flag: Element.__ready_for_runtime_and_cached
, which, unfortunately became another part of Element._update_state()
. We know that _update_state()
is a complex area of the code and we should aim to eventually remove the concept of it.
An Element becomes ready for runtime and cached when:
- It has a strong cache key
- It is cached
- Its runtime dependencies are ready for runtime and cached (this ensures the runtimes of runtimes are also cached).
This MR introduces the method Element._attempt_to_notify_reverse_dependencies()
which will notify all direct reverse dependencies of an Element once said Element becomes ready for runtime and cached.
This is another small step towards making _update_state()
less complex and removing its concept. Additionally, it implements more explicit push-based behaviour.
Edited by James Ennis