every_door icon indicating copy to clipboard operation
every_door copied to clipboard

Smarter options to delete downloaded data

Open neuschaefer opened this issue 1 year ago • 7 comments

The situation:

  • Sometimes Every Door complains that there are too many downloaded data points, and suggests deleting.
  • The only option (as far as I can see) is to "purge all downloaded data", which is a bit annoying because it would delete usable data too
  • Every Door knows when data in a specific region is "obsolete", and it can warn about that

Possible ideas:

  • Add a button to delete obsolete data
  • Add a setting to delete obsolete data automatically, on a regular schedule (perhaps only if a certain database size is exceeded)
  • Add a button to delete data outside of specific perimeter relative to the current position. (This is probably difficult to use well, and I would prefer the previous solutions.)

Version: I use Every Door 3.0 (installed via Fdroid).

neuschaefer avatar May 14 '23 13:05 neuschaefer

The only option (as far as I can see) is to "purge all downloaded data", which is a bit annoying because it would delete usable data too

Ummm, no? Even in 3.0, there is Purge obsolete cached data and only after that button has already been pressed it changes to Purge all downloaded data. e.g.:

small_Screenshot_20230528_190525_info zverev ilya every_door small_Screenshot_20230528_190540_info zverev ilya every_door

Add a setting to delete obsolete data automatically, on a regular schedule (perhaps only if a certain database size is exceeded)

That might be useful, though - but only if such max db size were user configurable option (otherwise any such limit would likely be too little for some people, and too much for others). (But I personally am fine with manual control as it is...)

mnalis avatar May 28 '23 17:05 mnalis

Even in 3.0, there is Purge obsolete cached data and only after that button has already been pressed it changes to Purge all downloaded data.

I've pressed this button before, but not since the last app launch or even device reboot. It does say Purge all downloaded data, however.

How and when is the "button has already been pressed" status cleared?

neuschaefer avatar May 28 '23 19:05 neuschaefer

I haven't checked in the code, but it seems to me that when there exists obsolete (i.e. not recent enough) data in the cache, than it will show Purge obsolete cached data, and if that button is pressed, it will only clear such obsolete data.

Once there is no obsolete data but only recent data (like it would be immediately after pressing Purge obsolete cached data, but also in other conditions e.g. if data is still considered fresh and not obsolete, because not enough time has passed since data was downloaded), then Purge all downloaded data is shown instead of that button (and pressing that clears all data, even the recent / non-obsolete data).

mnalis avatar May 28 '23 20:05 mnalis

Whatever the underlying logic is, I observe the following currently:

  • In the main view, I get the yellow banner that says Data is obsolete, tap here to refresh, so there's at least some data that this part of ED considers obsolete
  • In the configuration view, the option is Purge all downloaded data

So, some kind of inconsistency or bug results in a confusing outcome, which doesn't seem to match what you describe.

(For example, perhaps the yardstick for obsolete data is inconsistent between the main view and the configuration view)

neuschaefer avatar May 28 '23 23:05 neuschaefer

I definitely plan to change the current cache management, from a line in Settings to a dedicated panel. And introduce imagery tiles management there as well. Not in the near future, though, but on the roadmap.

Zverik avatar May 30 '23 13:05 Zverik

Depends on #640.

Zverik avatar Oct 08 '23 07:10 Zverik

Roelant says, on iOS there isn't even a settings option to clear the cache. This needs to go earlier, maybe in an unfinished state.

Zverik avatar Oct 10 '23 06:10 Zverik