Browse files

rescue LoadError if memcache isn't available while loading the MemCac…

…he fragment store

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 408f496 commit 3dc62ab8f98eab37afbede3c93c3f0c210e37359 @technoweenie technoweenie committed Oct 3, 2007
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/lib/action_controller/caching.rb
View
4 actionpack/lib/action_controller/caching.rb
@@ -485,6 +485,7 @@ def initialize(address = 'druby://localhost:9192')
end
end
+ begin
require_library_or_gem 'memcache'
class MemCacheStore < MemoryStore #:nodoc:
attr_reader :addresses
@@ -497,6 +498,9 @@ def initialize(*addresses)
@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

0 comments on commit 3dc62ab

Please sign in to comment.