Comments (5)
Yes. It may be as well a more generic option (e.g. suffix
), just something that is added to the key.
from django-cache-memoize.
I like that. One could perhaps use it like this:
from gitutils import get_current_git_sha
current_git_sha = get_current_git_sha()
@cache_memoize(60, version=current_git_sha)
from django-cache-memoize.
That would, if you chose to use it like that, mean that a fresh new deployment triggers a different cache key for all memoized functions.
from django-cache-memoize.
version / suffix would be nice, it can be set somewhere in project settings globally so if one really wants - all cache will be cleared when such option changes.
from django-cache-memoize.
I vote for version
.
Django itself does support the version
argument: https://docs.djangoproject.com/en/3.2/topics/cache/#cache-versioning
It should be easy to add just one more pass-through argument to cache_memoize
.
from django-cache-memoize.
Related Issues (20)
- invalidate_cache doesn't work in 0.1.4 release
- tox runs no tests
- Drop python 2.7 support HOT 3
- Why not kwargs_rewrite? HOT 7
- clear cache in different processing HOT 8
- Why _refresh and invalidate doesn't work? HOT 9
- Arguments containing colons can be mis-cached
- How to know the cache key of a cached function? HOT 3
- Add a license HOT 2
- Issue new release on pypi HOT 2
- Feature Request: extra key components HOT 2
- Release the package with Django 3.2 support HOT 2
- Incomplete sdist
- Invalidate cache for a given function HOT 1
- Caching result only if not None.
- Add support for Django 4.0 HOT 5
- Also tag releases on Git
- Pickle error unsupported
- Please update changelog for new releases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-cache-memoize.