Add a version constant for diff cache so it can be cleared on major updates.
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 16 May 2007 19:10:41 +0000 (19:10 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 16 May 2007 19:10:41 +0000 (19:10 +0000)
Added a release note for a related diff bug

RELEASE-NOTES
includes/DifferenceEngine.php

index e1a5854..de71d4b 100644 (file)
@@ -62,6 +62,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Diff style rules have been broken out to common/diff.css,
   and the dupes removed from the default skin files.
   Skins can still override the default rules.
+* (bug 1229) Balance columns in diff display evenly
 
 
 == MediaWiki API changes since 1.10 ==
index 172e89e..511995d 100644 (file)
@@ -5,6 +5,14 @@
  * @addtogroup DifferenceEngine
  */
 
+/**
+ * Constant to indicate diff cache compatibility.
+ * Bump this when changing the diff formatting in a way that
+ * fixes important bugs or such to force cached diff views to
+ * clear.
+ */
+define( 'MW_DIFF_VERSION', '1.11' );
+
 /**
  * @todo document
  * @public
@@ -323,7 +331,7 @@ CONTROL;
                $key = false;
                if ( $this->mOldid && $this->mNewid ) {
                        // Try cache
-                       $key = wfMemcKey( 'diff', 'oldid', $this->mOldid, 'newid', $this->mNewid );
+                       $key = wfMemcKey( 'diff', 'version', MW_DIFF_VERSION, 'oldid', $this->mOldid, 'newid', $this->mNewid );
                        $difftext = $wgMemc->get( $key );
                        if ( $difftext ) {
                                wfIncrStats( 'diff_cache_hit' );