Skip to content

Commit

Permalink
include node version in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
fa93hws committed Nov 20, 2019
1 parent 60204a3 commit a0ad07a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli-engine/lint-result-cache.js
Expand Up @@ -20,6 +20,7 @@ const hash = require("./hash");
//-----------------------------------------------------------------------------

const configHashCache = new WeakMap();
const nodeVersion = process && process.version;

/**
* Calculates the hash of the config
Expand All @@ -28,7 +29,7 @@ const configHashCache = new WeakMap();
*/
function hashOfConfigFor(config) {
if (!configHashCache.has(config)) {
configHashCache.set(config, hash(`${pkg.version}_${stringify(config)}`));
configHashCache.set(config, hash(`${pkg.version}_${nodeVersion}_${stringify(config)}`));
}

return configHashCache.get(config);
Expand Down

0 comments on commit a0ad07a

Please sign in to comment.