DmitryBespalov / Cache

DIY caching in Swift
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

TinyLFU #1

Open ben-manes opened 7 years ago

ben-manes commented 7 years ago

You would probably find TinyLFU an interesting approach, as it focuses on admission rather than eviction. This is done by using a popularity sketch to probabilistically estimate the frequency of the new arrival compared to the victim, choosing whichever has the highest frequency. You may also find this project's simulator a useful resource, as LIRS is difficult to implement correctly due to subtleties in the paper.

DmitryBespalov commented 7 years ago

Thanks for sharing. TinyLFU looks interesting, indeed. I had Bloom filter in mind, too. Let's see if I'll come close to implementing those :)