A redis-backed autocompleter for Django projects.
Project description
django-cache-helper
Overview
django-cache-helper is a simple tool for making caching functions, methods, and class methods a little bit easier. It is largely based off of django-cache-utils, however, since cache-utils did not support caching model methods by instance and carried other features I didn't need, django-cache-helper was created.
In order to cache a function/method/class_method/static_method:
# Caching a function
@cached(60*60) # 60 Minutes
def foo(bar):
return bar
class Incrementer:
@cached_instance_method(60 * 60)
def instance_increment_by(self, num):
return num
@classmethod
@cached_class_method(60 * 60)
def class_increment_by(cls, num):
return num
@staticmethod
@cached(60 * 60)
def get_datetime(num):
return num
Support
Python: 3.7, 3.8, 3.9, 3.10
Django: 3.2
Contributors ✨
Thanks goes to these wonderful people.
Kevin Fox |
Tom Jakeway |
Ara Anjargolian |
Hyuckin David Lim |
James |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-cache-helper-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b14be2447ab1818cb75e0c7124245914883f36991cc4e0c85cfd1a8fc7722ee7 |
|
MD5 | 93afebe6c7159d7384688d3308020571 |
|
BLAKE2b-256 | 352787b3c00b43dc0611ba4c4d4aa6234ba862700de3ab9d6735b41826cb64f1 |
Close
Hashes for django_cache_helper-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a2dccc5d1cec68b691eb52242f26d11084347b640c8bdfb53b4ff814afd58bb |
|
MD5 | 95f283c2ed5510bdf46f6a7fd7fda75b |
|
BLAKE2b-256 | c36019ccdea535e883f93fd7c8d2f2d6b198b1550d851394c02b712c15bf8f56 |