New issue
Advanced search Search tips

Issue 667631 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 667627



Sign in to add a comment

Static files on swarming appear to be not cachable

Project Member Reported by tansell@chromium.org, Nov 22 2016

Issue description

This seems to affect both the new UI and the old UI

Things like;

 - https://chromium-swarm.appspot.com/default.css
 - https://chromium-swarm.appspot.com/third_party/bootstrap/css/bootstrap-3.1.0.min.css
 - Request URL:https://chromium-swarm.appspot.com/third_party/jquery/jquery-1.11.0.min.js
 - https://chromium-swarm.appspot.com/res/js/js.js

All have the header;
 - cache-control:no-cache, must-revalidate

This makes the UI much slower than it could be.

 

Comment 1 by kjlubick@google.com, Nov 22 2016

Status: Started (was: Assigned)
I enabled cache-control in https://codereview.chromium.org/2525703002 for the res/* stuff (and any other straggling cache).  

The stuff in third_party already had a cache-control of 30 days (1)

This was difficult to test because Chrome doesn't always seem to respect the time to live, overriding the cache-control sometimes. http://stackoverflow.com/a/34294707

Additionally, App Engine will sometimes override content-control if cookies are involved (like they are if the user is logged into the old ui) [2]

In any case, the screenshots you provided in https://bugs.chromium.org/p/chromium/issues/detail?id=667627#c1, and my own testing show that App Engine is using etag extensively (each of the 304 responses is an etag check).  I could only observe (with dev tools open) Chrome making these etag checks, never the caching.


[1] https://github.com/luci/luci-py/blob/master/appengine/components/components/static_third_party.yaml#L7
[2] https://cloud.google.com/appengine/docs/python/how-requests-are-handled#headers_added_or_replaced

Comment 3 by kjlubick@google.com, Nov 28 2016

Status: Fixed (was: Started)
The caching is now enabled on chromium-swarm.  https://httpsecurityreport.com/?report=https://chromium-swarm.appspot.com/res/elements.html shows :

Cache-Control	public, max-age=3600
Etag	"4GHZ7A"

https://httpsecurityreport.com/?report=https://chromium-swarm.appspot.com/default.css shows

Cache-Control	public, max-age=600
Etag	"4GHZ7A"

Comment 4 by kjlubick@google.com, Nov 28 2016

Blocking: 667627
Etags should *only* be used for things which change dynamically. Anything like default.css should not have them.

Comment 6 by kjlubick@google.com, Nov 29 2016

App Engine adds the etags, not me.

Comment 7 by kjlubick@google.com, Nov 29 2016

It's a "feature"

Sign in to add a comment