From 5af5e209b539e4f93ac43d6fe7c5bce7a391770c Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Sun, 3 Jul 2005 07:27:43 +0000 Subject: [PATCH] key parser cache on ($action==render) --- includes/ParserCache.php | 5 +++-- includes/Title.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/ParserCache.php b/includes/ParserCache.php index 8b3cf9a221..b6f5345a4a 100644 --- a/includes/ParserCache.php +++ b/includes/ParserCache.php @@ -21,10 +21,11 @@ class ParserCache { } function getKey( &$article, &$user ) { - global $wgDBname; + global $wgDBname, $action; $hash = $user->getPageRenderingHash(); $pageid = intval( $article->getID() ); - $key = "$wgDBname:pcache:idhash:$pageid-$hash"; + $renderkey = (int)($action == 'render'); + $key = "$wgDBname:pcache:idhash:$pageid-$renderkey!$hash"; return $key; } diff --git a/includes/Title.php b/includes/Title.php index 0761f91698..91dd6c2e91 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -729,9 +729,9 @@ class Title { * @access public */ function getLocalURL( $query = '' ) { - global $wgLang, $wgArticlePath, $wgScript, $wgMakeDumpLinks; + global $wgLang, $wgArticlePath, $wgScript, $wgMakeDumpLinks, $action; - if ( $this->isExternal() ) { + if ( $this->isExternal() || $action == 'render' ) { return $this->getFullURL(); } -- 2.20.1