Python - 内存缓存
Python - Memcached
我跟着 this tutorial on how to install and use Memcached as a service in windows 8. Then i headed to this 一个,因为我遇到了错误。现在 memcached 运行 作为一项服务没有问题,我什至可以通过 Telnet 连接到 127.0.0.1 11211
并且打开了一点 Telnet windows。
我没有说清楚的是我应该在这个 windows 中看到的内容。我有此 python 代码来测试 Memcached 是否正常工作,但我在 telent window:
中看不到任何内容
import memcache
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
mc.set("some_key", "Some value")
value = mc.get("some_key")
mc.set("another_key", 3)
mc.delete("another_key")
mc.set("key", "1") # note that the key used for incr/decr must be a string.
mc.incr("key")
mc.decr("key")
我应该在此 telnet window 中看到任何内容吗??因为现在只是一片黑色window,什么都没有
当然这是我第一次使用memcached
在此先感谢您能给我的任何帮助。
当您使用 telnet 连接到 memcached 时键入 "stats"。然后您将看到缓存 get/set 调用和其他统计信息。
我跟着 this tutorial on how to install and use Memcached as a service in windows 8. Then i headed to this 一个,因为我遇到了错误。现在 memcached 运行 作为一项服务没有问题,我什至可以通过 Telnet 连接到 127.0.0.1 11211
并且打开了一点 Telnet windows。
我没有说清楚的是我应该在这个 windows 中看到的内容。我有此 python 代码来测试 Memcached 是否正常工作,但我在 telent window:
中看不到任何内容import memcache
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
mc.set("some_key", "Some value")
value = mc.get("some_key")
mc.set("another_key", 3)
mc.delete("another_key")
mc.set("key", "1") # note that the key used for incr/decr must be a string.
mc.incr("key")
mc.decr("key")
我应该在此 telnet window 中看到任何内容吗??因为现在只是一片黑色window,什么都没有
当然这是我第一次使用memcached
在此先感谢您能给我的任何帮助。
当您使用 telnet 连接到 memcached 时键入 "stats"。然后您将看到缓存 get/set 调用和其他统计信息。