Skip to main content

New answers tagged

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 ...
gnasher729's user avatar
  • 49.4k
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 ...
Basilevs's user avatar
  • 4,484

Top 50 recent answers are included