I'm trying to use the MaxMind GeoIP database, and I notice that the C API provides a bunch of different cacheing modes as flags to the GeoIP_open
initialization call.
GEOIP_MEMORY_CACHE
GEOIP_CHECK_CACHE
GEOIP_INDEX_CACHE
GEOIP_MMAP_CACHE
these are flag bits, so you can provide any set of them, but there's no documentation as to what these flags mean or what they do, or (perhaps most important) how they interact.
The benchmarks page indicates that GEOIP_MEMORY_CACHE
makes it faster while GEOIP_CHECK_CACHE
makes it slower, but there's no indication as to why you would want to use (or not use) any of these flags.
Their github page describes the purpose of these caches.
These options can be combined using bit operators. For example you can use both GEOIP_MEMORY_CACHE and GEOIP_CHECK_CACHE by calling: GeoIP_open("/path/to/GeoIP.dat", GEOIP_MEMORY_CACHE | GEOIP_CHECK_CACHE);
Click to know more information