patterns for expiration settings for static files

51 views
Skip to first unread message

dobee

unread,
Oct 31, 2008, 4:20:40 PM10/31/08
to Google App Engine
is it possible to serve a static directory with a given expiration
time while serving a contained file with a different expiration.

for example this does not work for me:

- url: /static
expiration: 1d
static_dir: static

- url: /static/admin/xy\.nocache\.js
expiration: 60s
static_dir: static


thx in advance, bernd

Sylvain

unread,
Oct 31, 2008, 7:08:50 PM10/31/08
to Google App Engine
Yes, carefull there is a bug in the SDK, "expiration" does not work.
default_expiration works

Another thing, for your second handler, if it's a file you should use
"static_files" and not "static_dir"

dobee

unread,
Nov 1, 2008, 5:00:11 AM11/1/08
to Google App Engine
thx a lot

just for the records: you dont need default_expiration but the
static_files directive, the specific url needs to be first

- url: /static/admin/xy\.nocache\.js
expiration: 60s
static_files: static/admin/xy.nocache.js
upload: static/admin/xy.nocache.js

- url: /static
expiration: 1d
static_dir: static

thx, bernd

yejun

unread,
Nov 1, 2008, 5:05:40 AM11/1/08
to Google App Engine
Current static file/dir expiration doesn't work very well because
there's no Last Modified http header.
Reply all
Reply to author
Forward
0 new messages