Index: trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | * main() |
45 | 45 | **/ |
46 | 46 | public function execute( $par ) { |
47 | | - global $wgContLang, $wgSitename, $wgFeedClasses, $wgLanguageCode, $wgMemc; |
| 47 | + global $wgContLang, $wgSitename, $wgFeedClasses, |
| 48 | + $wgLanguageCode, $wgMemc, $wgOut, $wgGNSMsmaxage; |
48 | 49 | |
49 | 50 | list( $params, $categories, $notCategories ) = $this->getParams(); |
50 | 51 | |
— | — | @@ -71,6 +72,8 @@ |
72 | 73 | return; |
73 | 74 | } |
74 | 75 | |
| 76 | + $wgOut->setSquidMaxage( $wgGNSMsmaxage ); |
| 77 | + |
75 | 78 | $cacheInvalidationInfo = $this->getCacheInvalidationInfo( $params, |
76 | 79 | $categories, $notCategories ); |
77 | 80 | |
Index: trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php |
— | — | @@ -73,8 +73,15 @@ |
74 | 74 | // Configuration options: |
75 | 75 | $wgGNSMmaxCategories = 6; // Maximum number of categories to look for |
76 | 76 | $wgGNSMmaxResultCount = 50; // Maximum number of results to allow |
77 | | -$wgGNSMfallbackCategory = 'Published'; // Fallback category if no categories are specified. |
78 | 77 | |
| 78 | +// Fallback category if no categories are specified. |
| 79 | +$wgGNSMfallbackCategory = 'Published'; |
| 80 | + |
| 81 | +// How long to put in squid cache. Note also cached using wgMemc (for 12 hours), |
| 82 | +// but the wgMemc entries are checked to see if they are still relevant, where |
| 83 | +// the squid cache is not checked. So this should be a small number. |
| 84 | +$wgGNSMsmaxage = 1800; // = 30 minutes |
| 85 | + |
79 | 86 | // $wgGNSMcommentNamespace can be false to mean do not include a <comments> element in the feeds, |
80 | 87 | // or it can be true, to mean use the talk page of the relevent page as the comments page |
81 | 88 | // or it can be a specific namespace number ( or NS_BLAH constant) to denote a specific namespace. |