I added:

    resp.headers["cache-control"] = "public, max-age=360"

But it behaves inconsistently so I'm thoroughly confused.  Sometimes I
get 304, sometimes not.  Sometimes the "public" part appears in the
Cache-control line in the response, sometimes not.  Sometimes there's
an Etag header, sometimes not.  These changes do not necessarily
reflect whether I've changed the relevant portion of the source,
pressed shift-reload, or deleted the application's cache directory.

The cache argument for StaticURIParser is 'cache_max_age', not
'max_cache_age'.  The docstring says the latter but the code says the
former, so watch out for that.  With this I'm getting correct 304's,
Etags, and Cache-control on my static files, but it's still checking
the server each time.

So the caching isn't perfect but it's better than nothing, at least
part of the time.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to