Updated cache buster logic

Removed css and script busters in favour of a uuid/guid cache
buster that is generated when the app starts.

This change means that in the event your NodeBB crashes often,
users will not be able to rely on their browser cache to serve
an unchanged style/js file, but if that's the case, you've
got bigger problems anyway.

re: #3573
This commit is contained in:
Julian Lam
2015-09-11 16:03:08 -04:00
parent 961efa3533
commit 4f766ac7b5
3 changed files with 4 additions and 21 deletions

View File

@@ -70,8 +70,6 @@ apiController.getConfig = function(req, res, next) {
config.environment = process.env.NODE_ENV;
config.loggedIn = !!req.user;
config['cache-buster'] = meta.config['cache-buster'] || '';
config['script-buster'] = meta.js.hash || '';
config['css-buster'] = meta.css.hash || '';
config.requireEmailConfirmation = parseInt(meta.config.requireEmailConfirmation, 10) === 1;
config.topicPostSort = meta.config.topicPostSort || 'oldest_to_newest';
config.categoryTopicSort = meta.config.categoryTopicSort || 'newest_to_oldest';