Install versioned_urls plugin
Install versioned_urls plugin via
script/plugin install http://svn.lingr.com/plugins/versioned_urls
Add appropriate rewriting and cache-header-pushing configuration to your web servers, e.g., for lightty:
url.rewrite-once = ( “^/(.*.(css | js | gif | png | jpg)).v[0-9.]+$” => “/$1” ) |
expire.url = ( “/stylesheets/” => “access 10 years” ,
“/javascripts/” => “access 10 years”,
“/images/” => “access 10 years” )
More details
http://blog.dannyburkes.com/2006/11/2/versioned-urls-for-rails/