Permalink
Browse files

Only modify cache key when not processing assets, so that cache can s…

…till be used without the gem loaded
  • Loading branch information...
1 parent c2097e8 commit 6ec8b4d9b7aeeddc7d4124fee5b671cf09d75998 @ndbroadbent committed Oct 31, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/turbo-sprockets/sprockets_overrides/base.rb
@@ -31,7 +31,9 @@ def build_asset(logical_path, pathname, options)
def cache_key_for(path, options)
options[:process] = true unless options.key?(:process)
- "#{path}:#{options[:bundle] ? '1' : '0'}:#{options[:process] ? '1' : '0'}"
+ key = "#{path}:#{options[:bundle] ? '1' : '0'}"
+ key << ":0" unless options[:process]
+ key
end
end
end

0 comments on commit 6ec8b4d

Please sign in to comment.