A common technique is to add a fake version number in the query string for your static resources, e.g.,
http://mysite.com/static/something.css?v=123 You'll need to add something in your templating engine to add the fake version number when emitting a link to a static resource. Then, just increment your fake v number when you want an "expiration". On Sunday, 14 October 2018 07:31:31 UTC-7, Sam Edge wrote: > > Follow up: > > Wasn't anything to do with the outage - just a coincidence. Found this in > the docs: > > The expiration time will be sent in the Cache-Control and Expires HTTP > response headers, and therefore, the files are likely to be cached by the > user's browser, as well as by intermediate caching proxy servers such as > Internet Service Providers. After a file is transmitted with a given > expiration time, there is generally *no way* to clear it out of > intermediate caches, even if the user clears their own browser cache. > Re-deploying a new version of the app will *not* reset any caches. > Therefore, if you ever plan to modify a static file, it should have a short > (less than one hour) expiration time. In most cases, the default 10-minute > expiration time is appropriate. > > So I accidentally set some static files I wanted to redeploy with a long > expiration -- not sure to expire until November 10th. > > I was planning to release my project this week but this is a blocker. > Anyone been in this spot before? > > On Saturday, October 13, 2018 at 2:47:59 PM UTC+10:30, Sam Edge wrote: >> >> Since yesterdays outage ( >> https://status.cloud.google.com/incident/cloud-networking/18016), the >> static files on my AppEngine Standard PHP55 deploys are stale. >> >> For instance: >> >> >> runtime: php55 >> api_version: 1 >> >> >> default_expiration: "28d" >> >> >> handlers: >> - url: /build >> static_dir: build >> >> >> Usually when this sort of thing happen you can deploy a new version of >> your service and it busts any cache issue but I must have tried a dozen >> times and nothing happening. And yes I've definitely been cleaning my local >> caches ;) >> >> I also changed the bucket used when deploying for a clean upload but no >> difference. >> >> *gcloud app deploy --version next --bucket gs://test-bucket-empty* >> >> Overnight my application started serving the right files again but when I >> deployed it reverted back to the stale cache it was serving yesterday. >> >> I note that in the outage that Google Storage was affected, so I assume >> they are still mitigating the issue. >> >> Just putting this out there - is anyone else experiencing this or am I >> going mad? >> >> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/dc0c1d95-2841-427f-8d4a-658fedb260aa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
