Thread safe pylibmc cache pbackend for django
Project description
Default django pylibmc cache backend don’t work correctly using multithread uWSGI or celery worker.
This package uses separate connection for each context (thread or async context) and can be used as direct replacement of django.core.cache.backends.memcached.PyLibMCCache.
Install
pip install django_pylibmc_threadsafe
Configuration
This package has only one additional option - ignore_exc used to suppress all exceptions (behavior used in old django.core.cache.backends.memcached.MemcachedCache backend). All other options are identical to django.core.cache.backends.memcached.PyLibMCCache.
Example configuration:
CACHES = {
'default': {
'BACKEND': 'django_pylibmc_threadsafe.PyLibMCCache',
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX': '',
'OPTIONS': {
'binary': True,
'ignore_exc': True,
'behaviors': {
'ketama': True,
}
}
},
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_pylibmc_threadsafe-1.0.1.tar.gz
.
File metadata
- Download URL: django_pylibmc_threadsafe-1.0.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4291f84b21749ced7058078750a55dd9102033aa6b502b6cdeb23ab53417eaa1 |
|
MD5 | cd235dda11afec4fb70e4fe068a2308a |
|
BLAKE2b-256 | ae7d4150a656765978f0919dba03469eb676526f90046dfac16d3a40e67506d7 |
File details
Details for the file django_pylibmc_threadsafe-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: django_pylibmc_threadsafe-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9c61e001e12b6e6fc4319f9366d6eaff9b61250b09bf010a274050fe693eda4 |
|
MD5 | 28035fd528c01087fe6610ee43a46c61 |
|
BLAKE2b-256 | 61be425721053451538b1c748b5b0de2662f68e911d1e70a485de302e776294e |