Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Python module to use for Memcached?

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.

like image 305
bodacydo Avatar asked Mar 26 '10 16:03

bodacydo


1 Answers

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

like image 157
Andy Avatar answered Sep 30 '22 23:09

Andy