Index: branches/wmf/1.18wmf1/extensions/CentralNotice/special/SpecialBannerLoader.php |
— | — | @@ -6,8 +6,6 @@ |
7 | 7 | class SpecialBannerLoader extends UnlistedSpecialPage { |
8 | 8 | public $siteName = 'Wikipedia'; // Site name |
9 | 9 | public $language = 'en'; // User language |
10 | | - protected $sharedMaxAge = 600; // Cache for 10 minutes on the server side |
11 | | - protected $maxAge = 0; // No client-side banner caching so we get all impressions |
12 | 10 | |
13 | 11 | function __construct() { |
14 | 12 | // Register special page |
— | — | @@ -49,9 +47,10 @@ |
50 | 48 | * Generate the HTTP response headers for the banner file |
51 | 49 | */ |
52 | 50 | function sendHeaders() { |
53 | | - global $wgJsMimeType; |
| 51 | + global $wgJsMimeType, $wgNoticeBannerMaxAge; |
54 | 52 | header( "Content-type: $wgJsMimeType; charset=utf-8" ); |
55 | | - header( "Cache-Control: public, s-maxage=$this->sharedMaxAge, max-age=$this->maxAge" ); |
| 53 | + // No client-side banner caching so we get all impressions |
| 54 | + header( "Cache-Control: public, s-maxage=$wgNoticeBannerMaxAge, max-age=0" ); |
56 | 55 | } |
57 | 56 | |
58 | 57 | /** |
Property changes on: branches/wmf/1.18wmf1/extensions/CentralNotice/special/SpecialBannerLoader.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
59 | 58 | Merged /trunk/extensions/CentralNotice/special/SpecialBannerLoader.php:r109081 |
Index: branches/wmf/1.18wmf1/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -53,6 +53,9 @@ |
54 | 54 | // Example: '.wikipedia.org' |
55 | 55 | $wgNoticeCookieDomain = ''; |
56 | 56 | |
| 57 | +// Server-side banner cache timeout in seconds |
| 58 | +$wgNoticeBannerMaxAge = 600; |
| 59 | + |
57 | 60 | // When the cookie set in SpecialHideBanners.php should expire |
58 | 61 | // This would typically be the end date for a fundraiser |
59 | 62 | // NOTE: This must be in UNIX timestamp format, for example, '1325462400' |
Property changes on: branches/wmf/1.18wmf1/extensions/CentralNotice/CentralNotice.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
60 | 63 | Merged /trunk/extensions/CentralNotice/CentralNotice.php:r109081 |