开发者

Django Can't Read Membase Data?

开发者 https://www.devze.com 2023-02-07 20:05 出处:网络
I have two Membase clients - a Django website and a small python test file. I observed that the data saved by the python file can\'t be seen by the Django website, it returns None. However, If I save

I have two Membase clients - a Django website and a small python test file. I observed that the data saved by the python file can't be seen by the Django website, it returns None. However, If I save the same data (same keys and values) in the Django website, the site will be able to read the keys/values then.

This is the same code I use in both clients:

import memcache
mc = memcache.Client(['127.0.0.1:11211'])
ids = ["100000314125574", "100000335352069"]
us开发者_JAVA技巧ers = mc.get_multi(ids)

I am using the python-memcache client library.

I have been trying to solve this for hours. Please share your ideas. It is a real mystery to me why Django can't read the data saved from another client.


A good troubleshooting step is just to telnet manually to 127.0.0.1 on port 11211 and do a 'get ' for that key. If you get something back then at least you know the Membase server is functioning properly and you can focus on the Django side of things...where I'm much less knowledgeable.

0

精彩评论

暂无评论...
验证码 换一张
取 消