From what I understand, we cache the frequently accessed objects in a memory segment that is more easily accessible than normal disk reads.
getExternalFilesDir() are two different directories.
The difference is that the first one is intended only for temporary files or cache files that could be deleted by the system or the user (through the Settings corresponding button) to regain space.
The second one is intended for permanent files. Anyway, you have to take into account the considerations of the documentation regarding the directory returned by