r83416 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83415‎ | r83416 | r83417 >
Date:23:07, 6 March 2011
Author:platonides
Status:ok
Tags:
Comment:
Follow up r83140. Add a clear() method to ObjectCache so that it can be used by ForkController.
Modified paths:
  • /trunk/phase3/includes/ForkController.php (modified) (history)
  • /trunk/phase3/includes/objectcache/ObjectCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/objectcache/ObjectCache.php
@@ -22,6 +22,13 @@
2323 }
2424
2525 /**
 26+ * Clear all the cached instances.
 27+ */
 28+ static function clear() {
 29+ self::$instances = array();
 30+ }
 31+
 32+ /**
2633 * Create a new cache object of the specified type.
2734 */
2835 static function newFromId( $id ) {
Index: trunk/phase3/includes/ForkController.php
@@ -115,10 +115,10 @@
116116 }
117117
118118 protected function prepareEnvironment() {
119 - global $wgCaches, $wgMemc;
 119+ global $wgMemc;
120120 // Don't share DB or memcached connections
121121 wfGetLBFactory()->destroyInstance();
122 - $wgCaches = array();
 122+ ObjectCache::clear();
123123 unset( $wgMemc );
124124 }
125125

Follow-up revisions

RevisionCommit summaryAuthorDate
r84727Merged in the ObjectCache refactor and the Ehcache client. MFT r83135, r83136...tstarling03:28, 25 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83140* Rewrote ObjectCache.php to conform to the modern coding style, and to be le...tstarling09:37, 3 March 2011

Status & tagging log