www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Auto expiring cache library

reply Pasqui23 <p example.com> writes:
I want a library that offers an in-memory data structure,such 
that I can write,for example:

cache.insert(key,value,expiry)

and I can retrieve the value with something like 
cache[key],unless it has passed expiry seconds.

Can be done?What library should I use?
Apr 27
parent Jack Stouffer <jack jackstouffer.com> writes:
On Friday, 27 April 2018 at 09:07:31 UTC, Pasqui23 wrote:
 I want a library that offers an in-memory data structure,such 
 that I can write,for example:

 cache.insert(key,value,expiry)

 and I can retrieve the value with something like 
 cache[key],unless it has passed expiry seconds.

 Can be done?What library should I use?
Memcached
Apr 27