From 339d2b01436fa60c0848fb0b7cc4c6eea7b547dd Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 8 Oct 2014 16:53:22 -0400 Subject: [PATCH] closes #2246 --- src/meta/css.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/meta/css.js b/src/meta/css.js index 224ba596cf..b462240031 100644 --- a/src/meta/css.js +++ b/src/meta/css.js @@ -15,9 +15,7 @@ var winston = require('winston'), module.exports = function(Meta) { - Meta.css = { - 'css-buster': +new Date() - }; + Meta.css = {}; Meta.css.cache = undefined; Meta.css.acpCache = undefined; Meta.css.branding = {}; @@ -132,11 +130,10 @@ module.exports = function(Meta) { Meta.css[destination] = css; // Calculate css buster - var hasher = crypto.createHash('md5'), - hash; + var hasher = crypto.createHash('md5'); + hasher.update(css, 'utf-8'); - hash = hasher.digest('hex').slice(0, 8); - Meta.css.hash = hash; + Meta.css.hash = hasher.digest('hex').slice(0, 8); // Save the compiled CSS in public/ so things like nginx can serve it if (!cluster.isWorker || process.env.cluster_setup === 'true') {