django-cacheback
django-cacheback copied to clipboard
Smart caching for Django using Celery to refresh cached items asynchronously.
At present using this inside a class based view: ``` @method_decorator(cacheback(lifetime=60)) def get_context_data(...): ... ``` Causes an error: `AttributeError: 'functools.partial' object has no attribute '__module__'` The error arises in `jobs.prepare_args`...
- [x] Remove Django 2.0 - [x] Remove Django 2.1 - [x] Add Django 3.2 - [x] Add Django 4.0 - [x] Add Python 3.9 - [x] Add Python 3.10
Add a should_refresh method to escape async refresh when the cache is already fresh. This can happen when the worker is slow and there are too many refresh jobs to...
We use cacheback a lot for async 'always fast' fetching of data that is requested regularly. Example: Our API exposes weather info. This data is fetched from a 3rd party...
Just that, if you pass the `cache_alias` option to a `FunctionJob` (and hence the `cacheback` decorator), the resulting function won't respect it. The reason why is because `FunctionJob`'s super `__init__`...
I would like a general purpose `cacheback` template tag that functions the same as the builtin `cache` template tag except uses cacheback to update the cache asynchronously. I started a...
Similar to the built in cache tag except using cacheback. See #71
I love this library and is using it extensively in my project. I have added `get_or_create` function to QuerySetJob. It is fairly simple. Please review. Thanks
Access to `caches[alias]` must happen per thread. When you do it on init, you create a thread unsafe scenario. I fixed the same thing on Django. https://code.djangoproject.com/ticket/33252