New answers tagged observer-pattern
0
votes
Preventive measures for stopping developers from forgetting to update cached values
My strategy: All cached values have a Boolean “valid” and a getter that refreshes the cached value if it is not valid. And a method “invalidate” that sets valid = false. Then your code can access the ...
0
votes
Preventive measures for stopping developers from forgetting to update cached values
Every cache should be marked as stale whenever underlying data changes. This is not a responsibility of the actor performing the change, it is responsibility of the data storage.
In general, tasks ...
Top 50 recent answers are included
Related Tags
observer-pattern × 90design-patterns × 49
java × 17
design × 11
object-oriented × 10
mvc × 7
c# × 5
c++ × 5
object-oriented-design × 4
event-programming × 4
architecture × 3
javascript × 3
.net × 3
uml × 3
dependency-injection × 2
android × 2
architectural-patterns × 2
ios × 2
concurrency × 2
single-responsibility × 2
gui × 2
communication × 2
objective-c × 2
event × 2
swing × 2