他们的 github 页面描述了这些缓存的用途。
GEOIP_STANDARD - Read database from file system. This uses the least memory.
GEOIP_MEMORY_CACHE - Load database into memory. Provides faster performance but uses more memory.
GEOIP_CHECK_CACHE - Check for updated database. If database has been updated, reload file handle and/or memory cache.
GEOIP_INDEX_CACHE - Cache only the the most frequently accessed index portion of the database, resulting in faster lookups than GEOIP_STANDARD, but less memory usage than GEOIP_MEMORY_CACHE. This is useful for larger databases such as GeoIP Organization and GeoIP City. Note: for GeoIP Country, Region and Netspeed databases, GEOIP_INDEX_CACHE is equivalent to GEOIP_MEMORY_CACHE.
GEOIP_MMAP_CACHE - Load database into mmap shared memory. MMAP is not available for 32bit Windows.
可以使用位运算符组合这些选项。例如,您可以通过调用以下命令同时使用 GEOIP_MEMORY_CACHE 和 GEOIP_CHECK_CACHE: GeoIP_open("/path/to/GeoIP.dat", GEOIP_MEMORY_CACHE | GEOIP_CHECK_CACHE);
点击了解更多信息