merlos/iOS-Open-GPX-Tracker

When are offline caches automatically cleared? More settings would be nice

zachary-foster opened this issue · 4 comments

Thanks for the great app!

The offline cache is a great feature, but I find that it is randomly cleared, which makes it unreliable. Its not clear to me what causes the cache to clear. It would be nice if I can customize when the cache is cleared. Perhaps the ability to specify how much space to use in the cache and then remove the oldest tiles as needed once it is filled?

If you mean third party maps like OpenStreetMap or CARTO, this project uses https://github.com/merlos/MapCache, which claims the following:

Note that in the current version, the cache does not support expiration dates, so if you need to get an updated version of the tiles you must call clear() which will wipe out the whole cache.

I don't remember if any update has caused it to automatically clear cache / on specific expiry dates though, as it been quite a while and I can't remember. Just assuming README isn't outdated.

If you mean Apple maps, sorry but that's beyond our control.

The cache is stored in a iOS folders specific for caches.

The OS may delete them if the space is needed.

Is your device short in storage?

It could have been at the time, I am not sure, but I will consider that next time. Thanks!

merlos commented

Closed as it is a question. However, opened an enhancement to move the cache to a user controlled folder to prevent OS to automatically remove the offline cache.