Thanks! On Sep 27, 12:39 am, James Gardner <[EMAIL PROTECTED]> wrote: > You can edit your config/middleware.py file so the end of it looks like > this: > > ... > javascripts_app = StaticJavascripts() > > class NoCache(object): > def __init__(self, app): > self.app = app > def __call__(self, environ, start_response): > def sr(status,headers,exc_info=None): > headers.append( > ( > 'Cache-Control', > 'no-cache, no-store, must-revalidate' > ) > ) > return start_response(status,headers,exc_info) > return self.app(environ, sr) > > app = NoCache(app) > > app = Cascade([static_app, javascripts_app, app]) > return app > > If you want to force everything to be refreshed, not just the > dynamically generated pages you can wrap the whole app in the NoCache > middleware. > > Or you can do it from a controller action with: > > response.headers['Cache-Control']='no-cache, no-store, must-revalidate' > > James > > voltron wrote: > > How does one generate anti-cacheing headers in Pylons? > > > Thanks!
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---