Class: Sprockets::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/roda/plugins/sprockets_cache_key_fix.rb

Instance Method Summary collapse

Instance Method Details

#cache_key_for(path, options) ⇒ Object


13
14
15
16
17
18
19
20
21
# File 'lib/roda/plugins/sprockets_cache_key_fix.rb', line 13

def cache_key_for(path, options)
  processors = attributes_for(path).processors
  processors_key = processors.map do |p|
    version = p.respond_to?(:version) ? p.version : '0'
    "#{p.name}-#{version}"
  end.join(':')

  "#{path}:#{options[:bundle] ? '1' : '0'}:#{processors_key}"
end