diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-10-03 16:15:42 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-10-03 16:15:42 +0000 |
commit | 3dc62ab8f98eab37afbede3c93c3f0c210e37359 (patch) | |
tree | 02d759cb74b669d31b60704ccea252ee29e6c0af /actionpack | |
parent | 408f4964022a4ff47c24763af350c6d527855552 (diff) | |
download | rails-3dc62ab8f98eab37afbede3c93c3f0c210e37359.tar.gz rails-3dc62ab8f98eab37afbede3c93c3f0c210e37359.tar.bz2 rails-3dc62ab8f98eab37afbede3c93c3f0c210e37359.zip |
rescue LoadError if memcache isn't available while loading the MemCache fragment store
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index d04979644b..9ca0fa53df 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -485,6 +485,7 @@ module ActionController #:nodoc: end end + begin require_library_or_gem 'memcache' class MemCacheStore < MemoryStore #:nodoc: attr_reader :addresses @@ -497,6 +498,9 @@ module ActionController #:nodoc: @data = MemCache.new(*addresses) end end + rescue LoadError + # MemCache wasn't available so neither can the store be + end class UnthreadedFileStore #:nodoc: attr_reader :cache_path |