GWicke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277056

Change subject: RESTBase caching: Force clients to revalidate purged end points
......................................................................

RESTBase caching: Force clients to revalidate purged end points

Most of our purged end points should be re-validated by clients on each view,
so that they make sure to have the latest version before reusing content. This
forces clients to re-validate by setting max-age to 0, and adding
must-revalidate.

This patch also reduces max-age for the related end point to one hour, while
leaving s-maxage at a day. This makes sure that clients get the latest copy
from the CDN every now & then, and reduces the time to clear caches in
emergencies.

Change-Id: I16c494b2178e82364bda763662d604c49641efa1
---
M modules/restbase/templates/config.yaml.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/277056/1

diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index a060acb..5a4ebc7 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -59,9 +59,9 @@
             host: <%= @purge_host %>
             port: <%= @purge_port %>
         related:
-          cache_control: s-maxage=86400, max-age=86400
+          cache_control: s-maxage=86400, max-age=3600
         # Cache headers for purged end points.
-        purged_cache_control: s-maxage=43200, max-age=43200
+        purged_cache_control: s-maxage=43200, max-age=0, must-revalidate
 
 # A different project template, sharing configuration options.
 wikimedia.org: &wikimedia.org

-- 
To view, visit https://gerrit.wikimedia.org/r/277056
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16c494b2178e82364bda763662d604c49641efa1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to