English 中文(简体)
为什么在我的达詹戈里做高棉工作?
原标题:Why doesn t memcache work in my Django?
  • 时间:2009-10-11 08:25:24
  •  标签:
from django.core.cache import cache
    def testcache():
        cache.set( test , I am putting this message in ,3333)
        print cache.get( test )

它只是印刷品“None”。

这是“可能的补充”:

dovr      2241  0.0  0.8  57824  2144 ?        Ssl  04:20   0:00 memcached -d -u root -m 3900 -p 11211
dovr      2247  0.0  3.7  83696  9800 pts/2    S+   04:20   0:00 python manage.py runserver 0.0.0.0:8000

这也是我的背景。 py:

CACHE_BACKEND =  memcached://MYIPADRESS:11211/ 

顺便说一句,它过去曾工作,但现在却不远! 我不知道为什么。 So weird.

最佳回答

溶解。

Django was talking to the server. I did "nc IPADRESS 11211" . And typed "stats"

然后,我看一看三厘米的植被和碎块正在变化,这意味着它正在谈论。

Then, I realized that I had problem with code in my views. You can t have "space" in the key. It has to be non-spaceless (and encoded)

问题回答

你可以放心,通过从<条码>查询/代码>方法中回收的伐木价值,你能够从你的代码中抽取。 在你试图与外部界面连接时,可以预见到的是,听话时间是127.0.1。





相关问题
热门标签