I have a geoinfected webapp for which I send the IP address of the request to the remote commercial ip-to-location service and return the country, city, Internet provider, etc. for the IP address.
I am currently caching IP requests in my database to make subsequent searches faster and free (commercial search fees).
I wonder if I can optimize my caching again by assuming that the first 16 bits (i.e. aaa.bbb at aaa.bbb.ccc.ddd addresses) always have a uniform location. Thus, I can store no more than 2 ^ 15 records. I do not mind the uniformity of the ISP, but this information will also be useful.
source
share