Skip to main content

Thread safe pylibmc cache pbackend for django

Project description

version downloads license

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_pylibmc_threadsafe-1.0.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_pylibmc_threadsafe-1.0.1.tar.gz.

File metadata

File hashes

Hashes for django_pylibmc_threadsafe-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4291f84b21749ced7058078750a55dd9102033aa6b502b6cdeb23ab53417eaa1
MD5 cd235dda11afec4fb70e4fe068a2308a
BLAKE2b-256 ae7d4150a656765978f0919dba03469eb676526f90046dfac16d3a40e67506d7

See more details on using hashes here.

File details

Details for the file django_pylibmc_threadsafe-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_pylibmc_threadsafe-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9c61e001e12b6e6fc4319f9366d6eaff9b61250b09bf010a274050fe693eda4
MD5 28035fd528c01087fe6610ee43a46c61
BLAKE2b-256 61be425721053451538b1c748b5b0de2662f68e911d1e70a485de302e776294e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page