Hello folks,
I am implementing caching for my Python application and I want to use memcached. Which module do you suggest me to use? There are so many that I don't know which one to choose.
Thanks, Boda Cydo.
Hello folks,
I am implementing caching for my Python application and I want to use memcached. Which module do you suggest me to use? There are so many that I don't know which one to choose.
Thanks, Boda Cydo.
I use python-memcached and there's some good advice on usage in the source code header, referenced in this answer.
Use the third parameter to set the expiry.
From bundled memcached.html
help file:
set(self, key, val, time=0, min_compress_len=0)
so
mc.set(key, val, time)
More info and exmaples here
I use cmemcache, which is more performant (but no more mantained). As its developer suggest, you can switch to http://code.google.com/p/python-libmemcached.