aboutsummaryrefslogtreecommitdiffstats
path: root/includes/ParserCache.php
diff options
context:
space:
mode:
authorTim Starling <tstarling@users.mediawiki.org>2006-10-04 09:06:18 +0000
committerTim Starling <tstarling@users.mediawiki.org>2006-10-04 09:06:18 +0000
commite174a4ddfb96feee0a8305c60aade97c0ee30d3c (patch)
tree6b8754b58f949291b471471b275418a21b237cbe /includes/ParserCache.php
parentea4e4b0ed1b7d028af1d0d9c7346fb7851a1ef92 (diff)
downloadmediawikicore-e174a4ddfb96feee0a8305c60aade97c0ee30d3c.tar.gz
mediawikicore-e174a4ddfb96feee0a8305c60aade97c0ee30d3c.zip
Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/16791
Diffstat (limited to 'includes/ParserCache.php')
-rw-r--r--includes/ParserCache.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/ParserCache.php b/includes/ParserCache.php
index 612790a38b2c..1f2e2aaf0915 100644
--- a/includes/ParserCache.php
+++ b/includes/ParserCache.php
@@ -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;
}