Permalink
Browse files

Re-added support for memcache-client as per Yehudas

request. Updated failure message. Setting constant
for memcached gem. Tested, works with both gems.

Signed-off-by: Yehuda Katz <wycats@gmail.com>
  • Loading branch information...
1 parent 8a3d61d commit 17f81306657e59fc2e32851542f7d9aab9ef056f @benschwarz benschwarz committed with Aug 7, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/moneta/memcache.rb
View
@@ -1,7 +1,10 @@
begin
require "memcached"
+ MemCache = Memcached
rescue LoadError
- puts "You need the memcached gem to use the Memcache moneta store"
+ require "memcache"
+rescue
+ puts "You need either the `memcached` or `memcache-client` gem to use the Memcache moneta store"
exit
end
@@ -10,7 +13,7 @@ class Memcache
include Defaults
def initialize(options = {})
- @cache = Memcached.new(options.delete(:server), options)
+ @cache = MemCache.new(options.delete(:server), options)
end
def key?(key)

0 comments on commit 17f8130

Please sign in to comment.