Issue #4 resolved

Patch for max-age header typo to enable resource caching

Anonymous created an issue

I noticed that my tw2 widget resources got reloaded on every request, and traced it down to a typo in the header parameter. This fixes setting Cache-Control: max-age via tw2 configuration.

-- Teemu teemu.yli-elsila@nixu.com

{{{ --- tw2/core/resources.py.orig 2011-06-16 18:07:34.000000000 +0300 +++ tw2/core/resources.py 2011-06-16 18:07:41.000000000 +0300 @@ -243,7 +243,7 @@ resp = wo.Response(request=req, app_iter=stream, content_type=ct) if enc: resp.content_type_params['charset'] = enc - resp.cache_control = {'max_age': int(self.config.res_max_age)} + resp.cache_control = {'max-age': int(self.config.res_max_age)} return resp(environ, start_response) }}}