Module: Memdash::Client
- Defined in:
- lib/memdash/client.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/memdash/client.rb', line 3 def self.included(base) base.class_eval do alias_method :perform_without_stats, :perform alias_method :perform, :perform_with_stats end end |
Instance Method Details
#perform_with_stats(op, key, *args) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/memdash/client.rb', line 10 def perform_with_stats(op, key, *args) ret = perform_without_stats(op, key, *args) resp = perform_without_stats(:get, 'memdash') if resp.nil? || resp == 'Not found' generate_stats perform_without_stats(:add, 'memdash', true, Memdash.ttl, nil) end ret end |