- Notifications
You must be signed in to change notification settings - Fork0
A cache backend for Django using pylibmc
License
heroku-python/django-pylibmc-sasl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This package provides a memcached cache backend for Django usingpylibmc. You want to use pylibmcbecause it's fast.
This is a fork of thedjango-pylibmcpackage. These changes will eventually end up upstream.
django-pylibmc-sasl requires Django 1.3. It was written and tested on Python 2.7.x.
Get it frompypi:
pip install django-pylibmc-sasl
Your cache backend should look something like this:
CACHES = { 'default': { 'BACKEND': 'django_pylibmc.memcached.PyLibMCCache', 'LOCATION': 'localhost:11211', 'TIMEOUT': 500, 'BINARY': True, 'OPTIONS': { # Maps to pylibmc "behaviors" 'tcp_nodelay': True, 'ketama': True } }}
If you want to use the memcached binary protocol, set the BINARY key'svalue to True as shown above. BINARY is False by default.
If you want to controlpylibmc behaviors, use theOPTIONS. OPTIONS is an empty dict by default.
Pylibmc supportscompression and theminimum size (in bytes) of values to compress can be set via the Djangosetting PYLIBMC_MIN_COMPRESS_LEN. The default is 0, which is disabled.
This package breaks away from the current handling oftimeout=0
in Django.Django converts 0 into the default timeout, while django-pylibmc leaves it as0. memcached takes 0 to mean "infinite timeout." You can still passNone
to get the default timeout.
About
A cache backend for Django using pylibmc
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Languages
- Python100.0%