Smart caching for Django using Celery to refresh cached items asynchronously.
It’s an extensible caching library that refreshes stale cache items
asynchronously using a Celery_ or rq_ task (utilizing django-rq). The key
idea being that it’s better to serve a stale item (and populate the cache
asynchronously) than block the response process in order to populate the cache
synchronously.
… _Celery: http://celeryproject.org/
… _rq: http://python-rq.org/
Using this library, you can rework your views so that all reads are from
cache - which can be a significant performance boost.
A corollary of this technique is that cache hammering can be handled simply and
elegantly, avoiding sudden surges of expensive reads when a cached item becomes stale.
Yup - over on readthedocs.org
_.
… _over on readthedocs.org
: http://django-cacheback.readthedocs.org/en/latest/
Python 3.6+ is supported. Django 2.2+ is supported.
You betcha!
… image:: https://github.com/codeinthehole/django-cacheback/workflows/CI/badge.svg?branch=master
:target: https://github.com/codeinthehole/django-cacheback/actions?workflow=CI
:alt: CI Status
Probably - subject to the MIT license
_.
… _MIT license
: https://github.com/codeinthehole/django-cacheback/blob/master/LICENSE
Brilliant! Here are the contributing guidelines
_.
… _contributing guidelines
: http://django-cacheback.readthedocs.org/en/latest/contributing.html