It's not necessary to have a build script which explicitly changes the
version tag. I, for example, calculate a hash from
the CURRENT_VERSION_ID environment variable at runtime, and use its prefix
as a version tag. Since CURRENT_VERSION_ID is guaranteed to change on every
deployment, the version tag changes as well, and everything works fine.

On Sun, Dec 19, 2010 at 5:28 AM, Ben <[email protected]> wrote:

> I have recently implemented a cache-busting strategy myself. My build
> script changes the version number in the static asset URI, but the
> app.yaml config routes all requests to the correct path using a simple
> reg ex. It works well and means I can be very aggressive on setting
> expiry directives. Because the regular expression is simple enough the
> replacement token in my source code works on dev_appserver.py too.
> Which is obviously important.
>
> I'd be curious to hear how others do their cache busting (I found
> mangling the actual filename to be too inconvenient).
>
>
> On Dec 18, 4:38 am, Robert Kluin <[email protected]> wrote:
> > Hi Noel,
> >   People often want static content cached -- it reduces the load on
> > your app.  Also, there might be other intermediate caches to worry
> > about too, so it may not be only Google caching your content.
> >
> >   Yes, you should use some type of cache busting strategy.  It depends
> > on how your iPhone app is implemented, but perhaps you can use a
> > version number on your assets so they can be changed between versions?
> >
> > Robert
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Dec 17, 2010 at 12:57, Noel <[email protected]> wrote:
> > > I just pushed an update to my app in which a bunch of the static files
> > > changed and were important for the app behavior.
> >
> > > What I'm seeing is that any requests for those static files return an
> > > old version of the file! I did some digging around and it seems that
> > > other people are seeing this and GAE caches things very aggressively.
> >
> > > Two things:
> > > - Unless I'm missing something GAE shouldn't do that. When I submit
> > > changes with appcfg.py update, it knows exactly what has changed, so
> > > there's no reason it can't invalidate the caches for the static files
> > > that have changed.
> > > - Is there a way I can force it from here to start serving the latest
> > > version of a static file? I can't change the app because it's an
> > > iPhone app.
> >
> > > Is it true that in the future, the best way to avoid this might be
> > > something like adding ?timestamp=[hour] to the URL request? That way
> > > files won't be cached for more than an hour? Is there a better method?
> >
> > > Thanks.
> >
> > > --Noel
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups "Google App Engine" group.
> > > To post to this group, send email to [email protected]
> .
> > > To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> > > For more options, visit this group athttp://
> groups.google.com/group/google-appengine?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.

Reply via email to