Does the country based restrictions work with Cache plugins?

Yes, The we detect the country by the WooCommerce GeoLocation option, go to WooCommerce > setting > general and find the”Default customer location” option and select “Geolocate (with the page caching support)”. and then, save the setting and also you can clear the cache (cache plugin + browser cache) and check the scenario on your store again and in incognito window.