Hi everyone,
My Flutter app allows users to pick and capture photos and videos, and it also includes a video streaming feature. Over time, I’ve noticed that the app size has increased significantly due to cached and temporary media files. I’d like to implement a “Clear Cache” feature to help manage storage.
So far, I’ve tried clearing directories obtained from:
getTemporaryDirectory()getApplicationCacheDirectory()
However, on iOS, I noticed there’s a large /tmp folder that stores picked media and other temporary data. I’m uncertain whether it’s safe or advisable to delete this folder entirely, as it might contain files still being used by the system or other frameworks.
Has anyone implemented a reliable cache-clearing strategy for Flutter apps handling media capture and streaming?
Any best practices or pitfalls I should be aware of, especially regarding iOS temp directories?
Thanks in advance for your insights!