Index: branches/wmf/1.16wmf4/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -96,8 +96,11 @@ |
97 | 97 | $egFundraiserStatisticsMinimum = 1; |
98 | 98 | $egFundraiserStatisticsMaximum = 10000; |
99 | 99 | |
| 100 | +// Cache timeout for fundraiser statistics, in seconds |
| 101 | +$egFundraiserStatisticsCacheTimeout = 300; // 5 minutes |
100 | 102 | |
101 | 103 | |
| 104 | + |
102 | 105 | $wgContributionTrackingStatisticsViewWeeks = 3; |
103 | 106 | |
104 | 107 | $wgHooks['ParserFirstCallInit'][] = 'efContributionReportingSetup'; |
Index: branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics_body.php |
— | — | @@ -218,7 +218,7 @@ |
219 | 219 | /* Private Functions */ |
220 | 220 | |
221 | 221 | private function query( $type, $start, $end ) { |
222 | | - global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum; |
| 222 | + global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum, $egFundraiserStatisticsCacheTimeout; |
223 | 223 | |
224 | 224 | $key = wfMemcKey( 'fundraiserstatistics', $type, $start, $end ); |
225 | 225 | $cache = $wgMemc->get( $key ); |
— | — | @@ -310,8 +310,7 @@ |
311 | 311 | break; |
312 | 312 | } |
313 | 313 | if ( isset( $result ) ) { |
314 | | - // Cache invalidates once per minute |
315 | | - $wgMemc->set( $key, $result, 60 ); |
| 314 | + $wgMemc->set( $key, $result, $egFundraiserStatisticsCacheTimeout ); |
316 | 315 | return $result; |
317 | 316 | } |
318 | 317 | return null; |
Property changes on: branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
319 | 318 | Merged /trunk/extensions/ContributionReporting/FundraiserStatistics_body.php:r78787 |