I've had a similar question on the forum before with only half an answer. As an example, I create a simple datasource link to a Sharepoint calendar. In a single screen app, I create a gallery that displays events from that linked calendar if they are on todays' date. I want the app (running on an iPad) to refresh every few minutes to see if any new calendar events were added for the day. I add a timer set it for 2 minutes and call a refresh on the datasourch at the timer's endpoint. It's simple and it works great. The problem is the refresh causes a build up of off line cache that eventually fills the space on the iPad and it crashes. It takes a few days, but it happens. There is a manual clear cache in Powerapps' menu, but I don't want to manually clear the cache every few days.
I see where some are putting data into collections and show commands to clear offline cache. The problem I have read is, you still have to do a refresh on the datasource to update the collection. That seems to not fix my problem. I see all over the Internet people show you how to refresh data using a timer. I can't be the only one having this issue. Maybe it's so simple to fix and i'm just not seeing it.
Any suggestions would be appreciated.