sstephenson / sprockets

Rack-based asset packaging system
2.55k stars 24 forks source link

gem-related cache invalidation issue #710

Closed plashchynski closed 9 years ago

plashchynski commented 9 years ago

sprockets version 2.12.3 I have configured Rails cache and installed gem bootstrap-sass 3.3.1.0. In my application.css.sass I import bootstrap as following:

// application.css.sass
@import "bootstrap"

Then I upgraded bootstrap-sass to the version 3.3.3, but sprockets didn't refresh application.css and its fingerprint after precompilation.

The problem is that sprockets have cached the BundledAsset and its dependencies to the Rails cache. Bundler by default doesn't remove old versions of upgraded gems, so the cached links to required asset files are valid. ProcessedAsset#fresh? returns true, because dependencies are exists and are not changed.