Spaces in memcached keys are annoying
authorChad Horohoe <chadh@wikimedia.org>
Wed, 14 Aug 2013 22:23:30 +0000 (15:23 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Wed, 14 Aug 2013 22:23:59 +0000 (15:23 -0700)
Change-Id: I2fe2befb4c142cddbcfb73bd71b88d333e804428

includes/api/ApiMain.php

index 6dd6d59..4dd1713 100644 (file)
@@ -1150,7 +1150,7 @@ class ApiMain extends ApiBase {
                $this->setHelp();
                // Get help text from cache if present
                $key = wfMemcKey( 'apihelp', $this->getModuleName(),
-                       SpecialVersion::getVersion( 'nodb' ) );
+                       str_replace( ' ', '_', SpecialVersion::getVersion( 'nodb' ) ) );
                if ( $wgAPICacheHelpTimeout > 0 ) {
                        $cached = $wgMemc->get( $key );
                        if ( $cached ) {