Performance guidelines

  • Use transient and object caching for repeated lookups on the same request
  • Batch calls and avoid blocking requests on the critical path
  • Prefer lazy rendering of geo dependent blocks after initial HTML is cached
  • Log cache hits and misses to spot configuration issues

Sample REST lookup

https://yourdomain.com/wp-ajax.php?action=cf_geoplugin_lookup&ip=8.8.8.8

Sample response

{
  "country_code": "US",
  "country": "United States",
  "currency": "USD",
  "in_eu": 0,
  "accuracy_radius": "50km"
}
Was this page helpful?