Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Asset Cacher

Asset Cacher

This plugins changes the way Rails builds assets links. Instead of using links such as /javascripts/prototype.js?#{asset_id} it uses a more HTTPd and browser friendly approach, building links like /javascripts/prototype.#{asset_id].js This allows all browsers to cache assets correctly.

This is achieved by symlinking those files upon deployment.

You should add the following to your deploy.rb file:

task :after_symlink, :roles => [:app, :db] do run “cd #{release_path} && RAILS_ENV=production rake generate_asset_symlinks” end

This behaviour is only enabled for production and testing environments so action is required during development.

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'