Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -47,8 +47,9 @@ |
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | | - * Get the cache mode for the data generated by this module. Override this |
52 | | - * in the module subclass. |
| 51 | + * Get the cache mode for the data generated by this module. Override |
| 52 | + * this in the module subclass. For possible return values and other |
| 53 | + * details about cache modes, see ApiMain::setCacheMode() |
53 | 54 | * |
54 | 55 | * Public caching will only be allowed if *all* the modules that supply |
55 | 56 | * data for a given request return a cache mode of public. |
Index: trunk/phase3/includes/api/ApiQuery.php |
— | — | @@ -489,6 +489,7 @@ |
490 | 490 | |
491 | 491 | /** |
492 | 492 | * Create a generator object of the given type and return it |
| 493 | + * @param $generatorName string Module name |
493 | 494 | */ |
494 | 495 | public function newGenerator( $generatorName ) { |
495 | 496 | // Find class that implements requested generator |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -479,16 +479,18 @@ |
480 | 480 | * @return array |
481 | 481 | */ |
482 | 482 | public function extractRequestParams( $parseLimit = true ) { |
483 | | - $params = $this->getFinalParams(); |
484 | | - $results = array(); |
| 483 | + if ( !isset( $this->mCachedRequestParams ) ) { |
| 484 | + $params = $this->getFinalParams(); |
| 485 | + $this->mCachedRequestParams = array(); |
485 | 486 | |
486 | | - if ( $params ) { // getFinalParams() can return false |
487 | | - foreach ( $params as $paramName => $paramSettings ) { |
488 | | - $results[$paramName] = $this->getParameterFromSettings( $paramName, $paramSettings, $parseLimit ); |
| 487 | + if ( $params ) { // getFinalParams() can return false |
| 488 | + foreach ( $params as $paramName => $paramSettings ) { |
| 489 | + $this->mCachedRequestParams[$paramName] = $this->getParameterFromSettings( $paramName, $paramSettings, $parseLimit ); |
| 490 | + } |
489 | 491 | } |
490 | 492 | } |
491 | 493 | |
492 | | - return $results; |
| 494 | + return $this->mCachedRequestParams; |
493 | 495 | } |
494 | 496 | |
495 | 497 | /** |