I using some GeoIP service to place country flag on pages depends on country IP. And I need to cache JSON response for all pages on my site.
This code placed into
$.getJSON() is equivalent to
$.getJSON()
$.ajax({ dataType: "json", url: 'http://smart-ip.net/geoip-json/ip_address', data: data, success: function(data){ // do something here } });
In this form you can add additional parameters, such as cache:true, or any other $.ajax parameters you might need.
cache:true