| Class | Rack::Cache::EntityStore::MemCacheBase |
| In: |
lib/rack/cache/entitystore.rb
|
| Parent: | EntityStore |
| cache | [R] | The underlying Memcached instance used to communicate with the memcached daemon. |
# File lib/rack/cache/entitystore.rb, line 184
184: def self.resolve(uri)
185: if uri.respond_to?(:scheme)
186: server = "#{uri.host}:#{uri.port || '11211'}"
187: options = parse_query(uri.query)
188: options.keys.each do |key|
189: value =
190: case value = options.delete(key)
191: when 'true' ; true
192: when 'false' ; false
193: else value.to_sym
194: end
195: options[key.to_sym] = value
196: end
197: options[:namespace] = uri.path.sub(/^\//, '')
198: new server, options
199: else
200: # if the object provided is not a URI, pass it straight through
201: # to the underlying implementation.
202: new uri
203: end
204: end