[erlang-questions] Best way to implement a simple cache

ricardo_bcl tome.wave@REDACTED
Tue Dec 27 19:22:56 CET 2011

I decided to implement a very simple cache mechanism using ETS: 


For now, it only controls the number of elements in cache, because it's
faster and it did what I wanted, but can be easily modified to prune it
terms of bytes. 

Jan Vincent Liwanag wrote
> Hi guys,
> I wanted your take on how to implement a simple small key-value cache,  
> maybe holding around a few hundred tuples. The thing is, I don't want  
> the cache to be consuming all my memory so that entries in the cache  
> expires if it isn't read for some time or some maximum size is met.
> Jan Vincent Liwanag
> jvliwanag@
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org

View this message in context: http://erlang.2086793.n4.nabble.com/Best-way-to-implement-a-simple-cache-tp2118502p4237850.html
Sent from the Erlang Questions mailing list archive at Nabble.com.

More information about the erlang-questions mailing list