Skip to content
Browse files

accept Cache clients

  • Loading branch information...
1 parent 6191e47 commit 151404a024060b580250b880717d155195ae181c @seamusabshere committed Feb 23, 2011
Showing with 6 additions and 2 deletions.
  1. +5 −1 lib/cache_method/config.rb
  2. +1 −1 lib/cache_method/version.rb
View
6 lib/cache_method/config.rb
@@ -26,7 +26,11 @@ class Config
# Example:
# CacheMethod.config.storage = Memcached.new '127.0.0.1:11211'
def storage=(raw_client)
- @storage = ::Cache.new raw_client
+ if raw_client.is_a?(::Cache)
+ @storage = raw_client
+ else
+ @storage = ::Cache.new raw_client
+ end
end
def storage #:nodoc:
View
2 lib/cache_method/version.rb
@@ -1,3 +1,3 @@
module CacheMethod
- VERSION = "0.1.1"
+ VERSION = "0.1.2"
end

0 comments on commit 151404a

Please sign in to comment.
Something went wrong with that request. Please try again.