Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -546,6 +546,19 @@ |
547 | 547 | * Override the parent to generate help messages for all available modules. |
548 | 548 | */ |
549 | 549 | public function makeHelpMsg() { |
| 550 | + global $wgMemc; |
| 551 | + $this->mPrinter->setHelp(); |
| 552 | + // Get help text from cache if present |
| 553 | + $key = wfMemcKey( 'apihelp', $this->getModuleName() ); |
| 554 | + $cached = $wgMemc->get( $key ); |
| 555 | + if ( $cached ) |
| 556 | + return $cached; |
| 557 | + $retval = $this->reallyMakeHelpMsg(); |
| 558 | + $wgMemc->set( $key, $retval, 60*60 ); |
| 559 | + return $retval; |
| 560 | + } |
| 561 | + |
| 562 | + public function reallyMakeHelpMsg() { |
550 | 563 | |
551 | 564 | $this->mPrinter->setHelp(); |
552 | 565 | |