Class SSHKit::Backend::ConnectionPool::Cache
In: lib/sshkit/backends/connection_pool/cache.rb
Parent: Object

A Cache holds connections for a given key. Each connection is stored along with an expiration time so that its idle duration can be measured.

Methods

clear   evict   new   pop   push   same_key?  

Attributes

closer  [R] 
connections  [R] 
idle_timeout  [R] 
key  [RW] 

Public Class methods

Public Instance methods

Close all connections and completely clear the cache.

Close and remove any connections in this Cache that have been idle for too long.

Remove and return a fresh connection from this Cache. Returns `nil` if the Cache is empty or if all existing connections have gone stale.

Return a connection to this Cache.

[Validate]