Class: Airbrush::Publishers::Memcache
- Defined in:
- lib/airbrush/publishers/memcache.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Instance Method Summary collapse
-
#initialize(host) ⇒ Memcache
constructor
A new instance of Memcache.
- #publish(id, results) ⇒ Object
Constructor Details
#initialize(host) ⇒ Memcache
Returns a new instance of Memcache.
8 9 10 |
# File 'lib/airbrush/publishers/memcache.rb', line 8 def initialize(host) @host = host end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/airbrush/publishers/memcache.rb', line 6 def host @host end |
Instance Method Details
#publish(id, results) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/airbrush/publishers/memcache.rb', line 12 def publish(id, results) # need to calculate an outboue queue name somehow, client will also need this to get the results name = unique_name(id) queue = MemCache.new(@host) queue.set(name, results) log.debug "Published results from #{name}" end |