mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Made sitemap.xls caching configurable
refs https://github.com/TryGhost/Toolbox/issues/411 - Having hardcoded cache control values in the codebase makes it impossible to experiment with new values without a version release. - Having all values configurable by default will allow for easier caching experiments and customizations on self-hosting instances.
This commit is contained in:
parent
2c2fd20a17
commit
381e419471
2 changed files with 4 additions and 1 deletions
|
@ -65,7 +65,7 @@ module.exports = function setupSiteApp(routerConfig) {
|
|||
siteApp.use(mw.serveFavicon());
|
||||
|
||||
// Serve sitemap.xsl file
|
||||
siteApp.use(mw.servePublicFile('static', 'sitemap.xsl', 'text/xsl', constants.ONE_DAY_S));
|
||||
siteApp.use(mw.servePublicFile('static', 'sitemap.xsl', 'text/xsl', config.get('caching:sitemapXSL:maxAge')));
|
||||
|
||||
// Serve stylesheets for default templates
|
||||
siteApp.use(mw.servePublicFile('static', 'public/ghost.css', 'text/css', constants.ONE_HOUR_S));
|
||||
|
|
|
@ -117,6 +117,9 @@
|
|||
"sitemap": {
|
||||
"maxAge": 3600
|
||||
},
|
||||
"sitemapXSL": {
|
||||
"maxAge": 86400
|
||||
},
|
||||
"robotstxt": {
|
||||
"maxAge": 3600000
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue