I'm saving media files at this path and i wonder does iOS auto clean the cache or i have to do it manually?
let documentsUrl = self.fileManager.urls(for: .cachesDirectory, in: .userDomainMask).first!
Searched and there is no particular answer for it.
The operating system can clear this folder if needed.
Put data cache files in the Library/Caches/ directory. Cache data can be used for any data that needs to persist longer than temporary data, but not as long as a support file. Generally speaking, the application does not require cache data to operate properly, but it can use cache data to improve performance. Examples of cache data include (but are not limited to) database cache files and transient, downloadable content. Note that the system may delete the Caches/ directory to free up disk space, so your app must be able to re-create or download these files as needed. (emphasis mine)