Search code examples
memcachedkey-value-store

Memcached-like key-value store with no automatic data removal


In my Python app I need to share a key/value store among a few processes - one is updating the data, other processes are only retrieving it at random times. Persistence is not required.

My initial idea was to use memcached, but it seems to have some LRU mechanism to remove old data when it's short on RAM. I'd much prefer to get an error in such case.

Obviously, memcached was optimized to be a cache system, while what I need is simply a network-accessible hash table. I could implement something simple from scratch, but why reinvent the wheel?


Solution

  • Run memcached with the -M option.

    -M return error on memory exhausted (rather than removing items)