public
Description: Page caching extension of Shopify
Homepage: http://www.shopify.com
Clone URL: git://github.com/tobi/cacheable.git
Tobias Luetke (home) (author)
Sun Feb 24 08:51:37 -0800 2008
cacheable / init.rb
100644 12 lines (10 sloc) 0.454 kb
1
2
3
4
5
6
7
8
9
10
11
12
require File.dirname(__FILE__) + '/lib/cache'
require File.dirname(__FILE__) + '/lib/cacheable'
 
# Include the cacheable model in action controller so that the cache method is available.
ActionController::Base.send(:include, Cacheable)
 
# Load cache configuration from database.yml
if config = ActiveRecord::Base.configurations[RAILS_ENV]['cache']
  Cache.establish_connection(config)
else
  fail "Could not find cache: section in your database.yml"
end