Skip to content

Commit

Permalink
regenerate merged css and js on every initialization according to tim…
Browse files Browse the repository at this point in the history
…estamp to prevent outdated merged cache, fixes 1602#621
  • Loading branch information
Sagi Isha authored and Jean-Francois Remy committed Feb 26, 2015
1 parent f67518b commit 9d2772b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ var path = require('path'),
crypto = require('crypto'),
utils = require('./utils'),
FormForResource = require('./form-for-resource.js'),
_url = require('url');
_url = require('url'),
initializeTime = new Date;

/**
* Import utilities
Expand Down Expand Up @@ -224,7 +225,7 @@ function mergeFiles(app, scope, files) {
}
var ext = merged[scope].ext,
result = [],
shasum = crypto.createHash('sha1'),
shasum = crypto.createHash('sha1').update(initializeTime.toString()),
minify = [],
directory = merged[scope].directory = paths[scope].replace(/^\/|\/$/g, '');
// only merge local files
Expand Down

0 comments on commit 9d2772b

Please sign in to comment.