There's a couple of ways to do this. I think the easiest will be to use [Protocol Activation].
Make a protocol similar to clearmyapp://
, then have your app, on activation by that protocol, clear the cache then close itself. Then you can create a shortcut on your desktop or a script that will call clearmyapp://
.
The harder way would be to create a script that finds your app's folder in the Packages folder (in Users/Username/Local/Packages/PackageName), then finding the cache contents and deleting them.