Index: trunk/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: trunk/extensions/ContributionReporting/FundraiserStatistics_body.php |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | /* Private Functions */ |
219 | 219 | |
220 | 220 | private function query( $type, $start, $end ) { |
221 | | - global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum; |
| 221 | + global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum, $egFundraiserStatisticsCacheTimeout; |
222 | 222 | |
223 | 223 | $key = wfMemcKey( 'fundraiserstatistics', $type, $start, $end ); |
224 | 224 | $cache = $wgMemc->get( $key ); |
— | — | @@ -309,8 +309,7 @@ |
310 | 310 | break; |
311 | 311 | } |
312 | 312 | if ( isset( $result ) ) { |
313 | | - // Cache invalidates once per minute |
314 | | - $wgMemc->set( $key, $result, 60 ); |
| 313 | + $wgMemc->set( $key, $result, $egFundraiserStatisticsCacheTimeout ); |
315 | 314 | return $result; |
316 | 315 | } |
317 | 316 | return null; |