Metadata-Version: 1.1
Name: django-cache-headers
Version: 0.1.1
Summary: Configurable middleware to add HTTP caching headers for URL's.
Home-page: http://github.com/praekelt/django-cache-headers
Author: Praekelt Consulting
Author-email: dev@praekelt.com
License: BSD
Description: Django Cache Headers
        ====================
        
        .. figure:: https://travis-ci.org/praekelt/django-cache-headers.svg?branch=develop
           :align: center
           :alt: Travis
        
        Overview
        --------
        
        Django Cache Headers allows you to set HTTP caching headers for URL patterns
        according to certain policies. It does not perform any caching itself - it
        merely sets the headers on the response which are then interpreted by eg. Nginx.
        
        Installation
        ------------
        
        1. Install or add ``django-cache-headers`` to your Python path.
        2. Add ``cache_headers`` to your ``INSTALLED_APPS`` setting.
        3. Add ``cache_headers.middleware.CacheHeadersMiddleware`` before 
           SessionMiddleware and AuthenticationMiddleware to your ``MIDDLEWARE_CLASSES`` setting.
        
        Policies
        --------
        Django Cache Headers provides four caching policies. You may define your own policies.:
        
        1. all-users - response is marked as cached once for all users.
        2. anonymous-only - response is marked as cached once only for anonymous users.
        3. anonymous-and-authenticated - response is marked as cached once for anonymous users and once for authenticated users.
        4. per-user - response is marked as cached once for anonymous users and for each authenticated user individually.
        
        Settings
        --------
        
        The ``timeouts`` key combines the policy, timeout in seconds and URL regexes in a nested dictionary::
        
            CACHE_HEADERS = {
                "timeouts": {
                    "all-users": {
                        60: (
                            "^/all-users/",
                        )
                    },
                    "anonymous-only": {
                        60: (
                            "^/anonymous-only/",
                        )
                    },
                    "anonymous-and-authenticated": {
                        60: (
                            "^/anonymous-and-authenticated/",
                        )
                    },
                    "per-user": {
                        60: (
                            "^/per-user/",
                        )
                    },
                    "custom-policy": {
                        60: (
                            "^/custom-policy/",
                        )
                    }
                }
            }
        
        Authors
        =======
        
        Praekelt Consulting
        -------------------
        
        * Hedley Roos
        
        Changelog
        =========
        
        0.1.1
        -----
        #. Leave response untouched if status code is not 200.
        
        0.1
        ---
        #. Initial release.
        
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
