memcached
安装都是
http://pypi.python.org/pypi/python-memcached
redis
http://pypi.python.org/pypi/redis/2.4.11
安装都是
python setup.py install
ok
test
memcached
#!/usr/bin/env python
import memcache
mc = memcache.Client(['127.0.0.1:11211'],debug=0)
#mc.set("foo","bar")
value = mc.get("foo")
print value
redis
# _*_ coding:utf-8 _*_
import redis
r = redis.StrictRedis(host='localhost', port=6379,db=0)
r.set('foo','bar')
print r.get('foo')