update cache mechanism to handle forced profile

This commit is contained in:
Emil Tin
2017-09-19 09:32:52 +02:00
committed by Patrick Niklaus
parent 999211ed9c
commit 59f8330db4
3 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -20,11 +20,11 @@ module.exports = {
});
},
hashOfFile: (path, cb) => {
hashOfFile: (path, additional_content, cb) => {
fs.readFile(path, (err, result) => {
if (err) return cb(err);
let checksum = crypto.createHash('md5');
checksum.update(result);
checksum.update(result + (additional_content || "") );
cb(null, checksum.digest('hex'));
});
}