2012-11-25 22 views
1

我想輸出一個我在memcache中設置的值,但是我得到None,我做錯了什麼?python memcache中沒有設置值

import memcache 
mc = memcache.Client(["127.0.0.1:11211"]) 
mc.set("foo","bar") 
foo = mc.get("foo") 


print foo 
>>None 
+0

什麼memcached的日誌說? – soulseekah

+0

什麼是memcache? – martineau

+0

@martineau我會猜測http://gijsbert.org/cmemcache/index.html或更可能http://pypi.python.org/pypi/python-memcached/ – soulseekah

回答