Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

accept Cache clients

  • Loading branch information...
commit 151404a024060b580250b880717d155195ae181c 1 parent 6191e47
@seamusabshere authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.