def used
      return 0 if max.zero?
      amount = redis.get(key) || 0
      [amount.to_i, max].min
    end
def used
      return 0 if max.zero?
      amount = redis.get(key) || 0
      [amount.to_i, max].min
    end
Return amount of limit used

 @return [Integer] amount used