|
Hello everyone! I'm making a Django website for language learning. I need to put about 100K key/value pairs in a in-memory-cache (that I will find a way to make persistent). I've followed the guide to install python-memcached here. When let Django read my dictionary and enter the key/value pairs, random lookups of words that should be in the dictionary are not found. I also hardcoded one key value pair using this code: cache.set('foreignword', 'translation', 999999) ... which works. But when I enter this key/value pair into memcached BEFORE the dictionary entries, it cannot be found. This leads me to believe that I've exceeded the maximum allowed number of entries. How can I increase it? Thank you |
|
I don't believe there is a hard-coded maximum number of entries (keys) in memcached. Rather, you specify a certain amount of memory, and then if you commit new entries such that the allocated memory is exceeded, old entries are discarded to make room. This stackoverflow post corroborates. The amount of memory to allocated is specified by the Hope that helps! This was very helpful, thank you! I worked around the problem, not using memcached as a persistent storage. |