[erlang-questions] Optimal way to restrict a ram_copies table to N entries

Joel Reymont joelr1@REDACTED
Wed Jun 27 11:45:36 CEST 2007


Suppose I'm trying to use a ram_copies table as a cache and need to  
come up with a cache eviction strategy. I would like to push the  
oldest entry out upon inserting a new one once the ram_copies table  
is full (N items).

What's the best (quickest) way of doing this?

I thought putting cache eviction in a separate process but that can,  
potentially, mean that my cache can grow way too big if insertions  
happen very fast.

	Thanks, Joel

--
http://topdog.cc      - EasyLanguage to C# compiler
http://wagerlabs.com  - Blog








More information about the erlang-questions mailing list