Last modified: 2013-07-30 01:25:44 UTC
While QA testing CentralNotice today, I noticed a significant change from last year... The caching headers for the BannerListLoader are different than they were last year. Last year they were... Cache-Control:public, s-maxage=300, max-age=300, max-age=604800 (yes, that's 2 max-ages, see bug 26338) Now they are... Cache-Control:private, s-maxage=0, max-age=0, must-revalidate This makes me think that the cache override override (yes, double override) solution we were using isn't working any more. The practical effect of this is that loading banners on subsequent pageloads (after the first) will take about half a second longer (or worse for slow connections). No idea if this is related to the lower banner impressions, but it's definitely something we want to fix. Unfortunately, I have no idea how to reliably escape the squid cache overrides. Indeed it may not even be possible anymore. Regardless, we need to figure out a way to override the override, and preferably with a non-hackish solution that will be reliable (and free from cache interference from the Apaches as well).
Hopefully https://gerrit.wikimedia.org/r/#/c/23307/ fixes this for CN (See api/ApiCentralNoticeAllocations.php) -- but would still be nice to know proper method for Special Pages.
The bcache=1 query param now tells squid not to disable browser caching. Testing with: curl -v 'http://en.wikipedia.org/w/index.php?cache=%2Fcn.js&title=Special%3ABannerListLoader&language=en&project=wikipedia&country=US&bcache=1' And the response contains: Cache-Control: public, s-maxage=300, max-age=300
Does that mean that we can remove the cache=%2Fcn.js from the URL?
Yes.
Reopening until the URL change is applied to bannerController.js.
What if we want our squids to cache it; but not any intermediate cache server? IE: Our swuids rewrite public to private?
(In reply to comment #6) > What if we want our squids to cache it; but not any intermediate cache server? > > IE: Our swuids rewrite public to private? Then don't use urls with bcache=1. By default, the frontend squids rewrite cache-control like so: header_replace Cache-Control private, s-maxage=0, max-age=0, must-revalidate
BannerListLoader is probably being deprecated this week.
BannerListLoader is done for a while ago -- this is no longer relevant.