jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/390005 )

Change subject: Update cache-hit detection in SparqlHelper
......................................................................


Update cache-hit detection in SparqlHelper

Since operations/puppet commit 9fe853c0b8 (change Ib8898c4616), the WDQS
X-Cache-Status no longer contains just “hit” or “miss”, but more
detailed information like “hit-front” or “hit-remote”. We don’t care
about the details, but we do need to update our check to account for
them. For compatibility with other setups, we also still support just
“hit” without more details.

Change-Id: I1d2b1c0530e3a40e365b32dee28a41146d63a337
---
M includes/ConstraintCheck/Helper/SparqlHelper.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ConstraintCheck/Helper/SparqlHelper.php 
b/includes/ConstraintCheck/Helper/SparqlHelper.php
index 2b3b0ed..c4161a0 100644
--- a/includes/ConstraintCheck/Helper/SparqlHelper.php
+++ b/includes/ConstraintCheck/Helper/SparqlHelper.php
@@ -484,7 +484,7 @@
                        ( $endTime - $startTime ) * 1000
                );
 
-               if ( $request->getResponseHeader( 'X-Cache-Status' ) === 'hit' 
) {
+               if ( preg_match( '/^hit(?:-.*)?$/', 
$request->getResponseHeader( 'X-Cache-Status' ) ) ) {
                        $this->dataFactory->increment( 
'wikibase.quality.constraints.sparql.cached' );
                }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d2b1c0530e3a40e365b32dee28a41146d63a337
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to