In Android you can use getFilesDir() to get a path to your internal /files/ folder, whereas getCacheDir() gets you a path to your internal /cache/ folder.
Is the only functional difference between these two folders the fact that Android may auto-clear some files in the cache directory if needed?
I am trying to understand the kinds of situations in which it would be a good idea to use the cache folder.
getFilesDir() >> It is used for permanent storage directory.
getCacheDir() >> Returns application specific cache directory on the file system. The system could automatically delete files in this directory in some cases such as when memory is almost full.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With