This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Extended HTTP-caching for Django

Project Description

Enhanced cache_page decorator for Django views.

Compatibility

Django-cache properly works with Django 1.8, 1.9, 1.10 and 1.11 on Python 2.7, 3.4, 3.5 and 3.6.

Advantages

  • fixed certain amount of bugs (including #15855)
  • support of callable cache_timeout and key_prefix parameters

Usage

from djangocache import cache_page


@cache_page(cache_timeout=600)
def view(request):
    pass

Combination with last_modified and/or etag view decorators

If you planning to use cache_page among with last_modified and/or etag the latter must be placed after cache_page:

from djangocache import cache_page
from django.views.decorators.http import last_modified, etag


def etag_generator(request):
    return 'ETag!!'


@cache_page(cache_timeout=600)
@etag(etag_generator)
def view(request):
    pass

Installation

pip install --upgrade django-cache
Release History

Release History

This version
History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-cache-0.2.5.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256 Source Jun 19, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting