Remove failed experiment $wgCiteCacheReferences

This was briefly enabled in WMF production in 2009 and found not to work.
As far as I know, it's been disabled since then. Retaining it requires
maintaining the complex "half-parsed serialization" feature in the core
parser, which I'm deprecating in I838d7ac7f9a218. The core feature was
added solely to support this Cite caching experiment and is not used for
anything else.

Change-Id: I446e0c46913a390dbdf7b49b84040bf47ed6c2f9
This commit is contained in:
Tim Starling 2018-02-28 20:59:50 +11:00
parent df166f11cd
commit db85682b63
2 changed files with 2 additions and 25 deletions

View file

@ -94,7 +94,6 @@
"cite": "GlobalVarConfig::newInstance"
},
"config": {
"CiteCacheReferences": false,
"CiteStoreReferencesData": false,
"CiteCacheReferencesDataOnParse": false,
"CiteVisualEditorOtherGroup": false,

View file

@ -757,30 +757,8 @@ class Cite {
"\n" . implode( "\n", $ent ) . "\n"
);
// Let's try to cache it.
global $wgCiteCacheReferences, $wgMemc;
$data = [];
if ( $wgCiteCacheReferences ) {
$cacheKey = $wgMemc->makeKey(
'citeref',
md5( $parserInput ),
$this->mParser->Title()->getArticleID()
);
$data = $wgMemc->get( $cacheKey );
}
if ( !$data || !$this->mParser->isValidHalfParsedText( $data ) ) {
// Live hack: parse() adds two newlines on WM, can't reproduce it locally -ævar
$ret = rtrim( $this->mParser->recursiveTagParse( $parserInput ), "\n" );
if ( $wgCiteCacheReferences ) {
$serData = $this->mParser->serializeHalfParsedText( $ret );
$wgMemc->set( $cacheKey, $serData, 86400 );
}
} else {
$ret = $this->mParser->unserializeHalfParsedText( $data );
}
// Live hack: parse() adds two newlines on WM, can't reproduce it locally -ævar
$ret = rtrim( $this->mParser->recursiveTagParse( $parserInput ), "\n" );
if ( $responsive ) {
// Use a DIV wrap because column-count on a list directly is broken in Chrome.