From 435db17da8eb6531d169ea5654275bee381a074b Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sat, 2 Apr 2016 21:50:48 +0100 Subject: [PATCH] resourceloader: Make action=purge affect ResourceLoaderWikiModule Purging a wiki page included in a WikiModule should bump its version hash. This is not needed by design, but it's a workaround until our caching layers are more resilient against cache poisoning. This gives users the power to resolve issues themselves. Change-Id: I37d3379e76a6b652268c5a007e0ad741470fe6e1 --- includes/resourceloader/ResourceLoaderWikiModule.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php index 7b0d93a6c5..796dc20d87 100644 --- a/includes/resourceloader/ResourceLoaderWikiModule.php +++ b/includes/resourceloader/ResourceLoaderWikiModule.php @@ -298,7 +298,8 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule { if ( !$batch->isEmpty() ) { $res = $dbr->select( [ 'page', 'revision' ], - [ 'page_namespace', 'page_title', 'rev_len', 'rev_sha1' ], + // Include page_touched to allow purging if cache is poisoned (T117587, T113916) + [ 'page_namespace', 'page_title', 'page_touched', 'rev_len', 'rev_sha1' ], $batch->constructSet( 'page', $dbr ), __METHOD__, [], @@ -311,6 +312,7 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule { $this->titleInfo[$key][$title->getPrefixedText()] = [ 'rev_len' => $row->rev_len, 'rev_sha1' => $row->rev_sha1, + 'page_touched' => $row->page_touched, ]; } } -- 2.20.1