jenkins-bot has submitted this change and it was merged.

Change subject: API: Use page_touched for cache invalidation
......................................................................


API: Use page_touched for cache invalidation

So template updates will invalidate the cache

Change-Id: I897d46cd205c99f65bd60afb060a9e18ad8e9a61
---
M includes/api/ApiMobileView.php
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index 8ab7c0d..e73ade3 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -473,9 +473,11 @@
                        }
                }
                $latest = $wp->getLatest();
+               // Use page_touched so template updates invalidate cache
+               $touched = $wp->getTouched();
                if ( $this->file ) {
                        $key = wfMemcKey( 'mf', 'mobileview', 
self::CACHE_VERSION, $noImages,
-                               $latest, $this->noTransform, 
$this->file->getSha1(), $this->variant );
+                               $touched, $this->noTransform, 
$this->file->getSha1(), $this->variant );
                        $cacheExpiry = 3600;
                } else {
                        if ( !$latest ) {
@@ -490,7 +492,7 @@
                                'mobileview',
                                self::CACHE_VERSION,
                                $noImages,
-                               $latest,
+                               $touched,
                                $this->noTransform,
                                $parserCacheKey
                        );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I897d46cd205c99f65bd60afb060a9e18ad8e9a61
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to