Static Cache Management

The brightbox gem tries to serve static assets and cached pages directly with the web servers and by default instructs the browser to cache these assets for 10 years.

The cache is invalidated by using the standard Rails method of issuing asset timestamped urls, which happens automatically if you use the Rails helper methods to generate asset URLs.

Finer control

The max_age variable allows you to set the amount of time in seconds the browser will cache files served directly by the web server.

set :max_age, 10000

Due to a bug in the gem, versions earlier than 2.3.6 require this setting as a string: set :max_age, “1000”

docs/gemv2/staticcache.txt · Last modified: 2010/01/08 11:46 by caius