Non-magical object caching for Django.
Project description
django-cache-toolbox
Non-magical object caching for Django.
Another caching framework for Django that does not do any magic behind your back, saving brain cycles when debugging as well as sticking to Django principles.
Installation
From PyPI:
pip install django-cache-toolbox
Basic Usage
from cache_toolbox import cache_model, cache_relation
from django.db import models
class Foo(models.Model):
...
class Bazz(models.Model):
foo = models.OneToOneField(Foo, related_name='bazz', primary_key=True)
...
# Prepare caching of a model
cache_model(Foo)
# Prepare caching of a relation
cache_relation(Foo.bazz)
# Fetch the cached version of a model
foo = Foo.get_cached(pk=42)
# Load a cached relation
print(foo.bazz_cache)
See the module docstrings for further details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-cache-toolbox-1.6.1.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for django-cache-toolbox-1.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2253524e21ee151d51450a2c1cbf9af08316274d10b164aecbfaa6afab95c2a |
|
MD5 | 163b43111625d23aa294e71d49995d14 |
|
BLAKE2b-256 | d6a0df86726244589881e1666ef0b05ba49abd3eae3d7b0a2651a0d2bb943e80 |
Close
Hashes for django_cache_toolbox-1.6.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb1b34eac42e6e1a391e222cc1fa7197b04f2a722ec4e89d4b2e197b3e559ec |
|
MD5 | ebf1f969ce0aaa98a1593a4004c42314 |
|
BLAKE2b-256 | 34508fb4adcc16bc9823506b049ca7b789ba090140fc64ab336453b25028ab2a |