Comment

Comment by danbruc

[...] choosing the least recently used (LRU) is an obvious choice, since you’re more likely to use something if you’ve used it recently.

There are many other cache replacement policies [1] and they can outperform LRU especially if the quoted assumption is not true. It is for example quite common to have two types of data, one is frequently reused over very long periods, the other is reused over short periods after the first use. In those cases a more complex policy like ARC or CAR can provide noticeable improvements.

[1] https://en.wikipedia.org/wiki/Cache_replacement_policies

parent danbruc 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton