Follow up r83140. Add a clear() method to ObjectCache so that it can be used by ForkController.

This commit is contained in:
Platonides 2011-03-06 23:07:36 +00:00
parent 29eaa85c82
commit 9ced2d5c60
2 changed files with 9 additions and 2 deletions

View file

@ -115,10 +115,10 @@ class ForkController {
}
protected function prepareEnvironment() {
global $wgCaches, $wgMemc;
global $wgMemc;
// Don't share DB or memcached connections
wfGetLBFactory()->destroyInstance();
$wgCaches = array();
ObjectCache::clear();
unset( $wgMemc );
}

View file

@ -21,6 +21,13 @@ class ObjectCache {
return $object;
}
/**
* Clear all the cached instances.
*/
static function clear() {
self::$instances = array();
}
/**
* Create a new cache object of the specified type.
*/