Follow up r83140. Add a clear() method to ObjectCache so that it can be used by ForkController.
This commit is contained in:
parent
29eaa85c82
commit
9ced2d5c60
2 changed files with 9 additions and 2 deletions
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue