How To Clear Chrome/Safari Cache As Part Of Test Set Up

I am using Appium to test a mobile app on both Android and iOS. For the most part everything runs fine expect in Android I am having an issue with data retention between tests.

On first launch the app displays a welcome page where the user can select login. Doing so opens a login page that is a webview for entering user creds. My issue is that the previously submitted creds from previous tests are still stored in the browser cache causing tests to fail.

I have tried fullRest, and noRest to clear the AUT’s(App Under Test) cache but since I am not using the chrome app directly in testing it does not clear out any browser cache or memory.

So My question is, How can I clear out browser/chrome/safari cache as part of my test set up? Since using the rest capabilities only affects my AUT?

For android you can clear by package name -)

This is an example of how to clear Safari cache from iOS settings:

Could probably background AUT, open up settings and clear between tests. Not sure about other browsers.