Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87535
Change subject: Parsoid frontends VCL: strip X-Parsoid-Performance from cache
hits
......................................................................
Parsoid frontends VCL: strip X-Parsoid-Performance from cache hits
Avoid reporting stale performance data if request was a cache hit.
Related changes:
- I1d7fd94f2 (Parsoid): add X-Parsoid-Performance header
- I8085fdba3 (VisualEditor): pass thru XPP to client
The check for X-Cache hits in I8085fdba3 makes this redundant, but
I think it's cleaner this way.
Change-Id: I11f416e7a80b0e1ecf31b5f679273ae70728d102
---
M templates/varnish/parsoid-frontend.inc.vcl.erb
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/35/87535/1
diff --git a/templates/varnish/parsoid-frontend.inc.vcl.erb
b/templates/varnish/parsoid-frontend.inc.vcl.erb
index f4812ae..48a0a2e 100644
--- a/templates/varnish/parsoid-frontend.inc.vcl.erb
+++ b/templates/varnish/parsoid-frontend.inc.vcl.erb
@@ -14,3 +14,10 @@
sub vcl_fetch {
set beresp.ttl = 0s;
}
+
+sub vcl_deliver {
+ // Don't report stale performance data if request was a cache hit.
+ if (obj.hits > 0) {
+ unset resp.http.X-Parsoid-Performance;
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/87535
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I11f416e7a80b0e1ecf31b5f679273ae70728d102
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits