Class: Wildcloud::Router::Cache
- Inherits:
-
Object
- Object
- Wildcloud::Router::Cache
- Defined in:
- lib/wildcloud/router/cache.rb
Class Method Summary collapse
Class Method Details
.get(target) ⇒ Object
11 12 13 14 15 |
# File 'lib/wildcloud/router/cache.rb', line 11 def self.get(target) @connections ||= {} @connections[target] ||= [] @connections[target].shift end |
.inspect ⇒ Object
17 18 19 |
# File 'lib/wildcloud/router/cache.rb', line 17 def self.inspect @connections.inspect end |
.put(target, connection) ⇒ Object
5 6 7 8 9 |
# File 'lib/wildcloud/router/cache.rb', line 5 def self.put(target, connection) @connections ||= {} @connections[target] ||= [] @connections << connection end |