Change-Id: I3d8d93b3bb6f7e06fae7adc694e6d4d851b2d8c2
* @param string $id
*
* @return WANObjectCache
+ * @since 1.26
*/
static function getWANInstance( $id ) {
if ( isset( self::$wanInstances[$id] ) ) {
*
* @throws MWException
* @return WANObjectCache
+ * @since 1.26
*/
static function newWANCacheFromId( $id ) {
global $wgWANObjectCaches;
return new $class( $params );
}
+
+ /**
+ * Get the main WAN cache object
+ *
+ * @return WANObjectCache
+ * @since 1.26
+ */
+ static function getMainWANInstance() {
+ global $wgMainWANCache;
+
+ return self::getWANInstance( $wgMainWANCache );
+ }
}