cache() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Show source
Register or log in to add new notes.
August 7, 2009
2 thanks


This method only returns a cache manager object of sorts, to see what you can do with it, see ActiveSupport::Cache::Store.

August 7, 2009
0 thanks

Most common use case

Most common use case is probably:

Rails.cache.fetch "some key" do
  compute some value

This computes some value and caches it. Subsequent invocations will return cached value (as long as it is still cached).