r22206 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22205‎ | r22206 | r22207 >
Date:19:10, 16 May 2007
Author:brion
Status:old
Tags:
Comment:
Add a version constant for diff cache so it can be cleared on major updates.
Added a release note for a related diff bug
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DifferenceEngine.php
@@ -6,6 +6,14 @@
77 */
88
99 /**
 10+ * Constant to indicate diff cache compatibility.
 11+ * Bump this when changing the diff formatting in a way that
 12+ * fixes important bugs or such to force cached diff views to
 13+ * clear.
 14+ */
 15+define( 'MW_DIFF_VERSION', '1.11' );
 16+
 17+/**
1018 * @todo document
1119 * @public
1220 * @addtogroup DifferenceEngine
@@ -323,7 +331,7 @@
324332 $key = false;
325333 if ( $this->mOldid && $this->mNewid ) {
326334 // Try cache
327 - $key = wfMemcKey( 'diff', 'oldid', $this->mOldid, 'newid', $this->mNewid );
 335+ $key = wfMemcKey( 'diff', 'version', MW_DIFF_VERSION, 'oldid', $this->mOldid, 'newid', $this->mNewid );
328336 $difftext = $wgMemc->get( $key );
329337 if ( $difftext ) {
330338 wfIncrStats( 'diff_cache_hit' );
Index: trunk/phase3/RELEASE-NOTES
@@ -62,6 +62,7 @@
6363 Diff style rules have been broken out to common/diff.css,
6464 and the dupes removed from the default skin files.
6565 Skins can still override the default rules.
 66+* (bug 1229) Balance columns in diff display evenly
6667
6768
6869 == MediaWiki API changes since 1.10 ==