Avoid leak of updates in property caching code
The following discussion from !383 (merged) should be addressed:
-
@danieldg started a discussion: (+1 comment) A full fix for this issue may require a separate channel for each property. If you do that, you can replace the broadcaster with an (OwnedValue, EventListener) pair per property, as part of the property cache.
For uncached/uncacheable properties, you might need to change the cache to look something like:
struct { value: Option<OwnedValue>, cacheable: bool, // or enum { NotCacheable, Cacheable, Constant } changed: Event, // sent after setting the Option; the channel listens to it and then reads. // An invalidation PropertyChange signal can cause it to read a value of None. }
You could also do something a bit fancier that lets you discard the value if it's not supposed to be cached and all listeners have picked it up (or if there are no listeners).