3 ms·
You can just overwrite the cache with new information when the user replaces a file.
by tpetry 6y ago
You can just overwrite the cache with new information when the user replaces a file.
- _AzMoo 6y agoThat's update on write, not never invalidate.
- aequitas 6y agoYou can't, because you design to never invalidate, there is no way to ensure if and when this change is propagated through your entire cache layer (and local caches like browsers). And thus guarantee to the client the change has been made. I'm not saying it's a bad idea. But often a seemingly simple solution to a complex problem doesn't take the entire complexity of the problem into account. Which is fine if you can consciously make that tradeoff but more often than not will turn into a footgun eventually.