开发者

Installing memcached on OS X to use with django (python)

开发者 https://www.devze.com 2023-02-04 00:27 出处:网络
Hay, i was wondering if anyone can point me to a a tutorial on installing memcached to be used with django on OS X (grabbing source, making, installing, installing anything else i\'ll need to use it).

Hay, i was wondering if anyone can point me to a a tutorial on installing memcached to be used with django on OS X (grabbing source, making, installing, installing anything else i'll need to use it).

开发者_JS百科

any help would be great.


Try using homebrew instead of darwinports. It is very easy to use, and I installed memcached using it. Then it is just:

brew install memcached

Works great with sudo, as long as you haven't used sudo to install anything to wherever you installed homebrew.


Memcached server package: http://memcached.darwinports.com/

Python memcached client package: http://py-memcached.darwinports.com/


four simply steps:

1) brew install memcached

2) pip install python-memcached

3) brew services start memcached

4) django setup:

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


You can use brew too with

brew install memcached 

You can read about homebrew here: Link

0

精彩评论

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