From e7c73bda54e8cad48a8fd049de6f931388bfc687 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 16 May 2007 19:10:41 +0000 Subject: [PATCH] Add a version constant for diff cache so it can be cleared on major updates. Added a release note for a related diff bug --- RELEASE-NOTES | 1 + includes/DifferenceEngine.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e1a585426b..de71d4bcb9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 172e89ea6e..511995d9d2 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -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' ); -- 2.20.1