It is hard to make sure since the deleted data can be back with some recovery tools .The best way to wipe cache on iPhone:
No matter how you clean up data from your iPhone , these deleted data can be restored on iPhone , can you guarantee that your data has been permanently deleted?It is hard to make sure since the deleted data can be back with some recovery tools .
https://www.mobiledic.com/ios-topics/how-to-delete-everything-on-iphone.html
Connect your iPhone with a USB cable to a PC, the system will start automatically to download your factory cleaning software, if not go to https://drfone.wondershare.net for iphone software.Many iPhone cleaners can be found on Google or elsewhere,i also see some apps recommended below this post.But if you want to clean cache and history on iPhone,they don't help you.