django-cache-toolbox-1.6.1
توضیحات
Non-magical object caching for Django.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-cache-toolbox-1.6.1 |
| نام | django-cache-toolbox |
| نسخه کتابخانه | 1.6.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Chris Lamb |
| ایمیل نویسنده | chris@chris-lamb.co.uk |
| آدرس صفحه اصلی | https://chris-lamb.co.uk/projects/django-cache-toolbox |
| آدرس اینترنتی | https://pypi.org/project/django-cache-toolbox/ |
| مجوز | BSD |
# 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](https://pypi.org/project/django-cache-toolbox/):
```
pip install django-cache-toolbox
```
## Basic Usage
``` python
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.
نیازمندی
| مقدار | نام |
|---|---|
| >=1.9 | Django |
نحوه نصب
نصب پکیج whl django-cache-toolbox-1.6.1:
pip install django-cache-toolbox-1.6.1.whl
نصب پکیج tar.gz django-cache-toolbox-1.6.1:
pip install django-cache-toolbox-1.6.1.tar.gz