Skip to main content

Extended HTTP-caching for Django

Project description

Enhanced cache_page decorator for Django views.


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


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


from djangocache import cache_page

def view(request):

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!!'

def view(request):


pip install --upgrade django-cache

Project details

Download files

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

Files for django-cache, version 0.2.4
Filename, size File type Python version Upload date Hashes
Filename, size django-cache-0.2.4.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page