aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-10-03 14:52:56 +0000
committerRick Olson <technoweenie@gmail.com>2007-10-03 14:52:56 +0000
commit408f4964022a4ff47c24763af350c6d527855552 (patch)
tree862ad862ae7674b96ef7ecfd05e136e44e43ef18
parent904df818d61b695a5f9508864137d13fffa22d15 (diff)
downloadrails-408f4964022a4ff47c24763af350c6d527855552.tar.gz
rails-408f4964022a4ff47c24763af350c6d527855552.tar.bz2
rails-408f4964022a4ff47c24763af350c6d527855552.zip
Use #require_library_or_gem to load the memcache library for the MemCache session and fragment cache stores. Closes #8662. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7725 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_controller/caching.rb1
-rw-r--r--actionpack/lib/action_controller/session/mem_cache_store.rb2
3 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 3bc5797800..6c747deb11 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Use #require_library_or_gem to load the memcache library for the MemCache session and fragment cache stores. Closes #8662. [Rick]
+
* Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config. [Rick]
config.action_controller.optimise_named_routes = false
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index a072080849..d04979644b 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -485,6 +485,7 @@ module ActionController #:nodoc:
end
end
+ require_library_or_gem 'memcache'
class MemCacheStore < MemoryStore #:nodoc:
attr_reader :addresses
diff --git a/actionpack/lib/action_controller/session/mem_cache_store.rb b/actionpack/lib/action_controller/session/mem_cache_store.rb
index e62c0ef9cd..6fd3ed7c7b 100644
--- a/actionpack/lib/action_controller/session/mem_cache_store.rb
+++ b/actionpack/lib/action_controller/session/mem_cache_store.rb
@@ -9,7 +9,7 @@
begin
require 'cgi/session'
- require 'memcache'
+ require_library_or_gem 'memcache'
class CGI
class Session