Skip to main content

A fault-tolerant pylibmc cache backend for Django

Project description

https://travis-ci.org/lincolnloop/django-ft-cache.png?branch=master

A fault-tolerant pylibmc cache backend for Django

Documentation

By default, a failed cache operation in Django is fatal and will raise a 500 error. In some cases, this might not be desirable behavior. This cache backend will catch failures and log them, but not raise an exception. A cache get that fails will appear to be a miss to the application.

Installation

pip install pylibmc django-ft-cache

Replace the existing pylibmc cache backend in your settings with 'django_ft_cache.FaultTolerantPyLibMCCache'. For example:

CACHES = {
    'default': {
        'BACKEND': 'django_ft_cache.FaultTolerantPyLibMCCache',
        'LOCATION': ['127.0.0.1:11211'],
    },
}

Building Your Own

If you are already using a custom cache backend, a mixin is provided that should add this capability: django_ft_cache.FaultTolerantCacheMixin.

History

0.1.0 (2014-07-16)

  • Initial release

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-ft-cache-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file django-ft-cache-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-ft-cache-0.1.0.tar.gz
Algorithm Hash digest
SHA256 984aa04af664cd2c0f8c5dd61430ff26f256498c80f5d1dd52ffb1c93a25048d
MD5 936f195d0ae149f5f2e0103202c9db80
BLAKE2b-256 dd6bef7ae13191df00bac7db15b9316fe509ed39c56284d9cbf053fd1d6718b5

See more details on using hashes here.

Provenance

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