Git Product home page Git Product logo

cacheheaders_middleware's Introduction

cacheheaders_middleware

Paster-ready WSGI middleware adds cache-controlling headers to the HTTP Response and overrides the Expires header. This directive flexibly allows caching server to control caching time.

The package assigns response’s freshness lifetime in the following way:

    Cache-Control: public, max-age=3600, s-maxage=0

The configuration is very simple, a common case being:

    [filter:cacheheaders]
    use = egg:cacheheaders_middleware#cache_headers
    max_age=3600
    s_maxage=3600

Options

Cacheheaders_middleware enables inserting of the following cache-control headers:

  • max_age:

    Maximum age header indicates time (in seconds) for caching the http-response in the browser or caching proxy. Cacheheaders_middleware adds “max_age=” to the response and overrides the Expires header.

  • s_maxage:

    Shared maximum age header indicates time (in seconds) to cache the response in the caching proxy. Cacheheaders_middleware adds “s-maxage=” header to the response and overrides both the Expires header and max_age directive.

cacheheaders_middleware's People

Contributors

ktarasz avatar myroslav avatar sorenabell avatar

Watchers

James Cloos avatar  avatar Roman Kozlovskyi avatar  avatar Iaroslav Andrusyak avatar Taras Dyshkant avatar  avatar  avatar

Forkers

sorenabell delib

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.