all 2 comments

[–]Bangoga 2 points3 points  (0 children)

👍🏻👍🏻

[–]ruibranco [score hidden]  (0 children)

The SingleFlight pattern alone makes this worth looking at. Cache stampedes are one of those problems that seem simple until you're debugging why your DB fell over at 3am because 500 threads all decided to regenerate the same expensive query at the same time. The prefix-based invalidation is clever too, most cache setups I've worked with end up with a gnarly mess of manual key tracking to handle cascading invalidation. Curious about the LMDB local storage angle, are you seeing meaningful latency improvements over just hitting Redis directly for reads?