What Causes the Cache Stampede Problem

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Solution: turn off everything, go back to the fields, plant some potatoes and vegetables, be happy again with your simple life 😎👍

victorgarcia
Автор

One solution is to use a cache library that eliminates this problem, such as FusionCache

timarheit
Автор

I've implemented cache-aside recently and dealt with this by having a static concurrent hash set for the keys that are being currently processed. You try add the key to that collection, then you are allowed to continue with the rest of the logic in GetOrCreate. If the key can't be added, you are put on "hold" - some while loop where you keep trying after some interval (100 ms) to add your key. Once you get out of the loop you can do the GetOrCreate and in the end that key is removed from the concurrent collection, before you return the result.

iliyan-kulishev
Автор

Oh so that's how you get a cache miss. 😅😅

ahmedhafiz
Автор

I'm a senior dotnet developer with 8 years of experience. Interested in learning python and AI. Can i change my career as a python developer or should i improve my skills in .net. Can you please sugeest sir? Thanks

sathish-b