Deferrable function cache decorator
A variant of https://djangosnippets.org/snippets/2850/ that allows expensive calls to be deferred to an asynchronous process.
- cache
- memoize
- django-rq
- redis
A variant of https://djangosnippets.org/snippets/2850/ that allows expensive calls to be deferred to an asynchronous process.
I had a hell of a time getting most QR code stuffs out there working with Django. Many projects, but problems here and problems there. The only additional code you'll need for this is to "pip install qrcode". After that, you're free to <img src="{% qrcode_datauri "http://localhost:8000/" %}" />.
This is caching mechanism augmented to help address a number of common pitfalls in caching: cache stampeding, simultaneous expiry, cache invalidation, and the storing of None as a legitimate value. No doubt the automatic key generation could stand to be simplified, but it works.
bradbeattie has posted 3 snippets.