r/coding • u/madflojo • Aug 15 '26
Caching isn’t hard. Some data is hard to cache
https://bencane.com/posts/2026-07-30-caching-data-tradeoffs/
13
Upvotes
r/coding • u/madflojo • Aug 15 '26
31
u/valleyman86 Aug 16 '26
This is not new and only got harder with age.
"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-one errors." - Phil Karlton
8
u/Smallpaul Aug 15 '26
I’ve gotta admit I’ve never heard “Avoid caching because caching is difficult to get right.”
Web apps cache information all of the time and by default. Even when it IS difficult to get right.
2
u/recycled_ideas Aug 16 '26
This article completely ignores the third pillar of caching, that the data is requested frequently.
If a particular data set is going to be requested once a month by one user, it's not worth caching. That's what kills the benefit of most of read-only data, the fact that most read only data isn't checked often.