Index: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -115,9 +115,12 @@ |
116 | 116 | $egFundraiserStatisticsMinimum = 1; |
117 | 117 | $egFundraiserStatisticsMaximum = 10000; |
118 | 118 | |
119 | | -// Cache timeout for fundraiser statistics, in seconds |
| 119 | +// Cache timeout for fundraiser statistics (short timeout), in seconds |
120 | 120 | $egFundraiserStatisticsCacheTimeout = 900; // 15 minutes |
| 121 | +// Cache timeout for fundraiser statistics (long timeout), in seconds |
| 122 | +$wgFundraiserStatisticsLongCacheTimeout = 60 * 60 * 24 * 7; // one week |
121 | 123 | |
| 124 | + |
122 | 125 | $wgContributionTrackingStatisticsViewWeeks = 3; |
123 | 126 | |
124 | 127 | $commonModuleInfo = array( |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionReporting.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
125 | 128 | Merged /trunk/extensions/ContributionReporting/ContributionReporting.php:r105492 |
Index: branches/wmf/1.18wmf1/extensions/ContributionReporting/FundraiserStatistics_body.php |
— | — | @@ -312,7 +312,7 @@ |
313 | 313 | * @return an array of results or null |
314 | 314 | */ |
315 | 315 | private function query( $mostRecent, $start, $end ) { |
316 | | - global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum, $egFundraiserStatisticsCacheTimeout; |
| 316 | + global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum, $egFundraiserStatisticsCacheTimeout, $wgFundraiserStatisticsLongCacheTimeout; |
317 | 317 | |
318 | 318 | // Conctruct the key for memcached |
319 | 319 | $key = wfMemcKey( 'fundraiserstatistics', $start, $end ); |
— | — | @@ -359,11 +359,11 @@ |
360 | 360 | if ( isset( $result ) ) { |
361 | 361 | // Store the result in memcached. |
362 | 362 | // If it's the most recent fundraiser, cache for a short period of time, otherwise |
363 | | - // cache for 24 hours (since the query is expensive). |
| 363 | + // cache for long period of time |
364 | 364 | if ( $mostRecent ) { |
365 | 365 | $wgMemc->set( $key, $result, $egFundraiserStatisticsCacheTimeout ); |
366 | 366 | } else { |
367 | | - $wgMemc->set( $key, $result, 86400 ); |
| 367 | + $wgMemc->set( $key, $result, $wgFundraiserStatisticsLongCacheTimeout ); |
368 | 368 | } |
369 | 369 | return $result; |
370 | 370 | } |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting/FundraiserStatistics_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
371 | 371 | Merged /trunk/extensions/ContributionReporting/FundraiserStatistics_body.php:r105492 |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting |
___________________________________________________________________ |
Modified: svn:mergeinfo |
372 | 372 | Merged /trunk/extensions/ContributionReporting:r105492 |