I will being streaming "Cache Invalidation Isn't Hard" at http://twitch.tv/handmade_hero shortly. The topic of this lecture will be that cache invalidation isn't hard, and will include discussions on cache invalidation and it's not-being-hard-ness.
-
-
Replying to @cmuratori
I'm still in the middle of the stream but the answer seems to be: It's either trivial or impossible. If you cache the output of a "pure" function, cache invalidation is not a thing. If you cache the output of a changing function, just forget about it.
2 replies 0 retweets 0 likes -
Replying to @hasen_judy @cmuratori
I think the context in which "cache invalidation is hard" is something where the output can change but you can also know when it will change so you can invalidate the entry in the cache. But managing that is a bit intricate and if you get it wrong the whole system is broken.
2 replies 0 retweets 0 likes -
Replying to @hasen_judy @cmuratori
I think the technical term for this kind of problem is cache coherence, and it's something CPUs implement, for example, to cache memory.
1 reply 0 retweets 0 likes -
Replying to @hasen_judy @cmuratori
But like a lot of things in computer programming, students are taught these thigns are "scary". You can imagine someone who is beginner can easily mess things up without realizing what they have done. It's similar to pointer phobia, or non-GC programming.
1 reply 0 retweets 0 likes
That's why I think the pure functional caching ("memoization") is the thing to learn. That is not scary. Then if you want to do more seat-of-the-patents optimization, you can extend into it from there.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.