I'm trying to cache a controller method in both the server and
browser. One twist is it's a text document (a tab-delimited file).
Beaker caching is working on the server end (with 1 hour expire time):
from pylons.decorators.cache import beaker_cache
@beaker_cache(key=None,
I'm also trying to cache static files. In middleware.py:
static_app = StaticURLParser(config.paths['static_files'],
max_cache_age=360)
This does use ETAG and 304 but it's not using the browser cache:
http://localhost:5000/images/banner.jpg
GET /images/banner.jpg HTTP/1.1
Host:
On Jun 12, 2007, at 2:53 PM, Mike Orr wrote:
I'm trying to cache a controller method in both the server and
browser. One twist is it's a text document (a tab-delimited file).
Beaker caching is working on the server end (with 1 hour expire time):
from pylons.decorators.cache import
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
On Jun 12, 2007, at 4:18 PM, Mike Orr wrote:
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
On Jun 12, 7:18 pm, Mike Orr [EMAIL PROTECTED] wrote:
The cache argument ... 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.
As Phillip said above, it's the Expires header that will get the
browser to not bother
On Jun 12, 7:18 pm, Mike Orr [EMAIL PROTECTED] wrote:
The cache argument ... 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.
As Phillip said above, it's the Expires header that will get the
browser to not bother
On Jun 12, 7:18 pm, Mike Orr [EMAIL PROTECTED] wrote:
The cache argument ... 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.
As Phillip mentioned, it's the Expires header that will get the
browser to not bother