public
Description: The full source code for projects used in Railscasts episodes.
Homepage: http://railscasts.com
Clone URL: git://github.com/ryanb/railscasts-episodes.git
100644 14 lines (9 sloc) 0.318 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Railscasts Episode #115: Caching in Rails 2.1
 
http://railscasts.com/episodes/115
 
 
Console Commands
 
  Rails.cache.write('date', Date.today)
  Rails.cache.read('date')
  Rails.cache.fetch('time') { Time.now }
  cache = ActiveSupport::Cache.lookup_store(:mem_cache_store)
  product = Product.first
  product.cache_key