When Nodes (or NodeData) are changed we emit various signals that are connected inside the Package to various classes that flush caches or remove internal state.
In some update cases we need to flush all internal caches of all contexts. This is currently not possible in a nice way because we need to expose all context instances and expose a public method to access the 1st level node cache. We should try to make that completely private.
So in any case the access to something like the cache should be prevented (or restricted by visibility) and handled by signals / events. It could be a good idea to use the SignalSlotDispatcher in a different way than just connecting singletons in the Package (e.g. injecting it into the instances to not expose internal methods). One problem with this approach is the current SignalSlotDispatcher implementation that does not support priorities and thus the first slot connected will be notified first. So every slot that is connected in the Package will win over those connected in an injected dispatcher.
Jira issue originally created by user @hlubek:
When Nodes (or NodeData) are changed we emit various signals that are connected inside the Package to various classes that flush caches or remove internal state.
In some update cases we need to flush all internal caches of all contexts. This is currently not possible in a nice way because we need to expose all context instances and expose a public method to access the 1st level node cache. We should try to make that completely private.
So in any case the access to something like the cache should be prevented (or restricted by visibility) and handled by signals / events. It could be a good idea to use the SignalSlotDispatcher in a different way than just connecting singletons in the Package (e.g. injecting it into the instances to not expose internal methods). One problem with this approach is the current SignalSlotDispatcher implementation that does not support priorities and thus the first slot connected will be notified first. So every slot that is connected in the Package will win over those connected in an injected dispatcher.
Jira-URL: https://jira.neos.io/browse/NEOS-1323