Timed File Store plugin

Plugin details

It lets you expire fragments based upon the time of the cached file.

Websitehttp://happygiraffe.net/blog/archives/2006/05/08/timedfilestore-plugin-0-1 Repositoryhttp://happygiraffe.net/svn/public/timed_file_store/trunk/ Author Dominic Mitchell Tags Time, file LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://happygiraffe.net/svn/public/timed_file_store/trunk/

To activate, place something like this at the bottom of config/environment.rb.

  ActionController::Base.fragment_cache_store = TimedFileStore.new("#{RAILS_ROOT}/tmp/cache", :atime => 15.minutes)


NB: This has to come at the bottom, outside of the Rails::Initializer.run block. This is because the plugin isn't loaded until fairly late in the configuration process.

You can specify either :atime to judge based upon the last time that fragment was read, or :mtime to judge based on the time the fragment was last written to.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 7 months ago