Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 37 lines (27 sloc) 0.877 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
begin
  require 'memcache'
rescue LoadError
end

begin
  require 'memcached'
rescue LoadError
end

begin
  require 'mem_cache_with_consistent_hashing'
rescue LoadError
end

puts "=> You should be using the `memcache-client' gem. You're using RubyMemcache!" if Object.const_defined?(:RubyMemcache)

require 'acts_as_cached'

Object.send :include, ActsAsCached::Mixin

# Load ActsAsCached::Config.config_file
Dir.glob(Rails.root.join("config", "initializers", "*.rb")).each {|init| require init }

config_file = ActsAsCached::Config.config_file || Rails.root.join('config', 'memcached.yml')

if !File.exists?(config_file)
  Rails.logger.error { "No config file found. Make sure you used `script/plugin install' and have memcached.yml in your config directory." }
  exit!
end

ActsAsCached.config = YAML.load_file config_file

begin
  require 'extensions'
rescue LoadError
end
Something went wrong with that request. Please try again.