We implement a local cache with 2 implementations: One using Locks and the other without Locks. Dive in to understand the performance differences between the two implementations.
Looks like I should complete it after reading your article😅. I was originally inspired by a talk from a Dev at Reddit.
You might also want to look at decaying LFU caches. You can fine tune weights in it to decide how much it should behave like LFU and how much like LRU.
Nice, I'll check. I now realise people are really going into the eviction policies, which isn't something I was targeting. Maybe something I can focus on in a future article.
Great point. This was because I wanted to show the impact of eviction with the different cache variations. This implementation can definitely be optimized and is something that we will refine in the next weeks.
hey, this github link is giving 404
https://github.com/pratikpandey21/distributedcache
Sorry, will fix it tonight. I think I didn't make the repo public, thats why its 404.
Nice benchmarking. Need to look at the code carefulky though.
I was building a similar concurrent application layer caching library in Go: https://github.com/Aki0x137/wind.
Looks like I should complete it after reading your article😅. I was originally inspired by a talk from a Dev at Reddit.
You might also want to look at decaying LFU caches. You can fine tune weights in it to decide how much it should behave like LFU and how much like LRU.
Nice, I'll check. I now realise people are really going into the eviction policies, which isn't something I was targeting. Maybe something I can focus on in a future article.
An article in eviction policies and when to use them would be great.
Cool. Will work on that!
Why do you need to copy the entire cache on eviction? Can’t you implement LRU using a doubly-linked list of keys?
Great point. This was because I wanted to show the impact of eviction with the different cache variations. This implementation can definitely be optimized and is something that we will refine in the next weeks.
Got it! Thanks for clarifying