Index: trunk/phase3/includes/objectcache/ObjectCache.php |
— | — | @@ -22,6 +22,13 @@ |
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
| 26 | + * Clear all the cached instances. |
| 27 | + */ |
| 28 | + static function clear() { |
| 29 | + self::$instances = array(); |
| 30 | + } |
| 31 | + |
| 32 | + /** |
26 | 33 | * Create a new cache object of the specified type. |
27 | 34 | */ |
28 | 35 | static function newFromId( $id ) { |
Index: trunk/phase3/includes/ForkController.php |
— | — | @@ -115,10 +115,10 @@ |
116 | 116 | } |
117 | 117 | |
118 | 118 | protected function prepareEnvironment() { |
119 | | - global $wgCaches, $wgMemc; |
| 119 | + global $wgMemc; |
120 | 120 | // Don't share DB or memcached connections |
121 | 121 | wfGetLBFactory()->destroyInstance(); |
122 | | - $wgCaches = array(); |
| 122 | + ObjectCache::clear(); |
123 | 123 | unset( $wgMemc ); |
124 | 124 | } |
125 | 125 | |