Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
Invalidate cache when any option is changed
Browse files Browse the repository at this point in the history
This was suggested in the original no-container pull request, but I didn't
understand the reason for it. After experimentation I now see that Sass doesn't
break its cache when options that affect file contents are changed. Bummer. Just
to be safe let's break cache when any option is changed -- if people complain we
can remove some that certainly don't affect output files like our own `verbose`.
  • Loading branch information
robwierzbowski committed Sep 11, 2015
1 parent 4645821 commit 39f6aab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ exports.emitErr = function (stream, err) {
};

// Create unique temporary directory path per task using cwd, options, sources,
// and all matched files. Sourcemap option switching does not break Sass cache
// so we do it ourselves. Possibly a bug: https://github.com/sass/sass/issues/1830
// and all matched files. Switching options does not break Sass cache so we do
// it ourselves. Possibly a bug: https://github.com/sass/sass/issues/1830
exports.createIntermediatePath = function (sources, matches, options) {
return path.join(
options.tempDir,
Expand All @@ -20,7 +20,7 @@ exports.createIntermediatePath = function (sources, matches, options) {
process.cwd() +
JSON.stringify(sources) +
JSON.stringify(matches) +
options.sourcemap
JSON.stringify(options)
)
);
};
Expand Down

0 comments on commit 39f6aab

Please sign in to comment.