1. Installed memcached: apt-get install memcached
  2. Installed python-memcached: pip install python-memcached
  3. Changed my CACHES variable in the settings to this:

    CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
            'LOCATION': '127.0.0.1:11211',
        }
    }  


    然后:telnet 127.0.0.1 11211测试一下看是否成功!
    注意:

    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.

    出现这样的结果说明是成功的

    
    
posted on 2014-04-14 16:44  andylau168  阅读(155)  评论(0)    收藏  举报