Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lincolnloop/django-ft-cache
A fault-tolerant pylibmc cache backend for Django
https://github.com/lincolnloop/django-ft-cache
Last synced: 5 days ago
JSON representation
A fault-tolerant pylibmc cache backend for Django
- Host: GitHub
- URL: https://github.com/lincolnloop/django-ft-cache
- Owner: lincolnloop
- License: bsd-3-clause
- Created: 2014-07-17T05:15:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-10-05T18:05:20.000Z (about 4 years ago)
- Last Synced: 2024-08-09T03:10:03.303Z (5 months ago)
- Language: Python
- Size: 19.5 KB
- Stars: 24
- Watchers: 8
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- License: LICENSE
Awesome Lists containing this project
README
=============================
django-ft-cache
=============================.. image:: https://travis-ci.org/lincolnloop/django-ft-cache.png?branch=master
:target: https://travis-ci.org/lincolnloop/django-ft-cacheA 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:.. code-block:: python
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``.