Re:Data denormalization is broken
by TurningCanadian on Friday September 30, 2016 @03:19PM
(#12614628)
I skipped around a bit in the article, but didn't see them consider having database updates simply trigger a cache invalidation (i.e. set it null) of the denormalized data instead of doing a full recomputation every time the data changes. That way you only pay the price when you need it, and it still allows for caching. You can prewarm the cache with a cron while still allowing for ondemand calculation if the cache is cold.
[ Parent
| on HN ]
I think TFA was more about "when to invalidate/recompute" than "how to invalidate/update" -- that you need to take care to enumerate all of the times the denormalized value may get out of sync with the rest of the data.
(This is a reasonable idea though, depending on access patterns. Can increase latency, can decrease computation.)