-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
Hello,
I think it would be a good idea to support the ConnectionPool (same author as Dalli) as the storage instance. I was pointed to this https://github.com/rtomayko/rack-cache/blob/master/lib/rack/cache/storage.rb#L41-L52 so I hacked around and added another if branch and it looks like it works. I had to try this on the 1.2 version because I was not getting any messages on the master branch. Would you like a pull request? It looks like this gem is has not been updated in a while though. :-(
Thanks.
# hack in support for passing a Dalli::Client or Memcached object
# as the storage URI.
case
when defined?(::Dalli) && uri.kind_of?(::Dalli::Client) ||
defined?(::Dalli) && defined?(::ConnectionPool) && uri.kind_of?(::ConnectionPool)
type.const_get(:Dalli).resolve(uri)
# ...
endwvengen
Metadata
Metadata
Assignees
Labels
No labels