My app downloading and saving some support data to 'Library/Caches' directory. According to documentation,
Use this directory to write any app-specific support files that your app can re-create easily. Your app is generally responsible for managing the contents of this directory and for adding and deleting files as needed. In iOS 2.2 and later, the contents of this directory are not backed up by iTunes or iCloud. In addition, the system removes files in this directory during a full restoration of the device. In iOS 5.0 and later, the system may delete the Caches directory on rare occasions when the system is very low on disk space. This will never occur while an app is running. However, be aware that restoring from backup is not necessarily the only condition under which the Caches directory can be erased.
So, system may clean this folder. My app's supporting data not critical, so no need to put it in Documents or somewhere else. But I want to check how it handling if 'Caches' folder will be clear suddenly.
Of course, I can just check using NSFileManager if file exist.. and just use file or re-download. But one trick here exist. My app can download some files from server in background. While file downloading, it storing at 'Caches/com.apple.nsurlsessiond/[APP_ID]' and there is no way to check if file exist (because file fully managed by SDK on this step). I added error handling for this case to NSURLSession delegate and now need to check it in 'real life'.
Is there any way to directly or indirectly force system to clear 'Caches' directories for all apps?