Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Set response cache times for the whole site
branch: master
Failed to load latest commit information.
response_timeout initial commit
test initial commit
.gitignore initial commit
.travis.yml initial commit
CHANGES.txt initial commit
LICENSE.txt initial commit initial commit
requirements-dev.txt initial commit
requirements-testing.txt initial commit v0.1.0



django-response-timeout allows you to set the cache time globally for all responses. It provides a way to override the client side cache time for the Django per site caching middleware.


Installation is as easy as:

pip install django-response-timeout


Add response_timeout.middleware.SetCacheTimeoutMiddleware and place it after django.middleware.cache.UpdateCacheMiddleware so that it will set the header time first on cached responses.


Then set RESPONSE_CACHE_SECONDS to the number of seconds each page should be cached on the front end.

The Django documention does not cohesively describe how your middleware should be ordered, however this stackoverflow discussion does a fine job.


If you find issues or would like to see a feature suppored, head over to the issues section and report it. Don't be agraid, go ahead, do it!

To contribute code in any form, fork the repository and clone it locally. Create a new branch for your feature:

git commit -b feature/whatever-you-like

Then make sure all the tests past (and write new ones for any new features):

pip install -e .
pip install -r requirements-dev.txt test --settings=test.settings

Check if the README.rst looks right:

restview --long-description

Then push the finished feature to github and open a pull request form the branch.

New Release

To create a new release:

  1. Add changes to CHANGES.txt
  2. Change version in
  3. python register
  4. python sdist upload
Something went wrong with that request. Please try again.