summaryrefslogtreecommitdiff
path: root/includes/ParserCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/ParserCache.php')
-rw-r--r--includes/ParserCache.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/ParserCache.php b/includes/ParserCache.php
index 3ec7512f..1f2e2aaf 100644
--- a/includes/ParserCache.php
+++ b/includes/ParserCache.php
@@ -13,7 +13,7 @@ class ParserCache {
/**
* Get an instance of this object
*/
- function &singleton() {
+ public static function &singleton() {
static $instance;
if ( !isset( $instance ) ) {
global $parserMemc;
@@ -33,7 +33,7 @@ class ParserCache {
}
function getKey( &$article, &$user ) {
- global $wgDBname, $action;
+ global $action;
$hash = $user->getPageRenderingHash();
if( !$article->mTitle->userCanEdit() ) {
// section edit links are suppressed even if the user has them on
@@ -43,7 +43,7 @@ class ParserCache {
}
$pageid = intval( $article->getID() );
$renderkey = (int)($action == 'render');
- $key = "$wgDBname:pcache:idhash:$pageid-$renderkey!$hash$edit";
+ $key = wfMemcKey( 'pcache', 'idhash', "$pageid-$renderkey!$hash$edit" );
return $key;
}