39 40 41 42 43 44 45
# File 'lib/cash/buffered.rb', line 39 def incr(key, amount = 1) return unless value = get(key, true) @buffer[key] = value.to_i + amount buffer_command Command.new(:incr, key, amount) @buffer[key] end