Inconsistent (and faulty) caching of apks
Three diffirent devices (three different android versions) - all rooted. All running F-Droid 1.12.1 with identical settings (most notably "Keep cached apps / 1 Day").
## What did you do? (clear steps if possible)
Started to wonder why backups of F-Droid on some of the devices began to take an inordinate amount of time. For each of the devices, I went into /data/data/org.frdoid.fdroid in a shell.
## What did you expect to see?
Consistent handling with only apks for packages installed within the last day there.
## What did you see instead?
Android 10: When I saw (in Settings) "User data" exceeding 650 MB, I knew I had a problem (and began to investigate this). I found several weeks worth of apks in the directory /data/data/org.fdroid.fdroid/files, which I of course deleted (which obviously sped the backup up considerably :) ).
Android 7: Found nothing (no apks). I haven't installed any packages over the last day, so caching appears to work correctly on this device.
Android 6: Found a couple of weeks (I think I had cleared data for some reason then to solve a non-related problem) worth of apks in /data/data/org.fdroid.fdroid/cache/apks/{repository_name}/ (which I again, of course, deleted).
One might suggest the option of letting the user select the directory in which to download apks (so they would never become part of User data), but that would open the whole complicated mess of accessing external storage, which seems to change with every Android version.
issue