CircleCI-Archived / stefon

An asset pipeline for clojure
98 stars 16 forks source link

Use the md5 of the content instead of the file timestamp for memoization #23

Closed dwwoelfel closed 10 years ago

dwwoelfel commented 10 years ago

This fixes the problem where .ref files don't update on refresh.

The problem is that after stripping off the .ref, the file referenced by filename doesn't exist, and so it has a timestamp of 0. When we compare it with the timestamp stored in the memoization cache, we always find that the file hasn't changed.

The solution is to swap the timestamp comparison with a comparison of the md5 of the content before it is compiled.

dwwoelfel commented 10 years ago

Test failures are unrelated. I fixed them in this pull request: https://github.com/circleci/stefon/pull/22

pbiggar commented 10 years ago

@dwwoelfel lgtm, thanks

pbiggar commented 10 years ago

Great, thanks!