maxminddb
maxminddb copied to clipboard
Read in batches
I have a bunch of IP addresses. It is too expensive to get geographical information for them all one by one. Is there a way to read them in a batch?
client = ::MaxMindDB.new(Rails.root.join('geolite.mmdb'))
client.lookup(*[192.158.1.38, 192.158.1.39]) # splat args
client.lookup([192.158.1.38, 192.158.1.39]) # maybe use and array directly