Class: EventMachine::Campfire::Cache
- Inherits:
-
Object
- Object
- EventMachine::Campfire::Cache
- Defined in:
- lib/em-campfire/cache.rb
Instance Method Summary collapse
Instance Method Details
#get(key) {|store[key]| ... } ⇒ Object
4 5 6 7 8 |
# File 'lib/em-campfire/cache.rb', line 4 def get(key) key = cache_key_for(key) yield store[key] if block_given? store[key] end |
#set(key, val) ⇒ Object
10 11 12 |
# File 'lib/em-campfire/cache.rb', line 10 def set(key, val) store[cache_key_for(key)] = val end |