mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
408f496402
commit
3dc62ab8f9
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue