Class: Queight::ConnectionCache
- Inherits:
-
Object
- Object
- Queight::ConnectionCache
- Defined in:
- lib/queight/connection_cache.rb
Instance Method Summary collapse
- #call(options) ⇒ Object
-
#initialize ⇒ ConnectionCache
constructor
A new instance of ConnectionCache.
- #reset_cache! ⇒ Object
Constructor Details
#initialize ⇒ ConnectionCache
Returns a new instance of ConnectionCache.
5 6 7 |
# File 'lib/queight/connection_cache.rb', line 5 def initialize @cache ||= {} end |
Instance Method Details
#call(options) ⇒ Object
13 14 15 |
# File 'lib/queight/connection_cache.rb', line 13 def call() @cache[] ||= ChannelPool.new() end |
#reset_cache! ⇒ Object
9 10 11 |
# File 'lib/queight/connection_cache.rb', line 9 def reset_cache! @cache.values.each(&:reset_cache!) end |