views:

136

answers:

1

An open source high-performance project I'm working on needs to keep a cache of parsed/compiled files. A plain LRU or a plain LFU wouldn't fit. Plain LRU wouldn't work as there will be remote batch/spider processes hitting the service regularly. Plain LFU wouldn't work because content will age. ARC seems like the perfect solution but since IBM holds patents to it at least one open source project dropped it.

Are there any (good enough) alternatives?

EDIT: I'm not looking for exactly the same thing, just something that could handle those two situations. Perhaps some simple strategy with timestamps and sources. There have to be many programmers who faced this situation before. That's why the "good enough" bit.

A: 

According to the Wikipedia article you cite for ARC, PostgreSQL replaced ARC with "another algorithm." Given that PostgreSQL is open sourced under BSD, perhaps their current algorithm might be a good place to start...

Dave Swersky
A quick analysis of PostgreSQL sources show they just "Simple" LRU.
alecco
Humph. Software patenting is evil :(
Dave Swersky