No commit activity in last 3 years
No release in over 3 years
Rewrites cache buster for assets to a static string that is sure to be cached by proxy servers.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
>= 0
>= 0
~> 2.0.0.beta.20
 Project Readme

Vidibus::AssetCacheBuster¶ ↑

Rewrites cache buster for assets to a static string that is sure to be cached by proxy servers.

Example:

/stylesheets/screen.css?1297772836

will become

/stylesheets/screen.1297772836.css

For more information about proxy caching, take a look at the documentation of Google’s Page Speed tool.

This gem is part of the open source service-oriented video framework Vidibus.

Installation¶ ↑

Add the dependency to the Gemfile of your application:

gem "vidibus-asset_cache_buster"

Then call bundle install on your console.

To get this solution working, it is required to add some configuration to your Apache2 VirtualHost:

# Remove timesstamp from versioned static javascripts, stylesheets, and images.
# This requires a change in Rails so that assets will be included as image.12345.jpg
RewriteEngine on
RewriteRule ^/(javascripts|stylesheets|images)/(.+)\.(.+)\.(js|css|jp?g|gif|png)$ /$1/$2.$4 [L]

This rewrite does not support SSL yet. Maybe Apache2 config should be improved…

Copyright © 2011 Andre Pankratz. See LICENSE for details.