You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Our offline database cache currently evicts tiles based on a least recently used strategy. With an API like #2006 that would allow prefetching tiles along a path or at a destination, we'd need the ability to control cache eviction to prevent those unused tiles from getting evicted from the cache.
We should think about whether we can instead calculate a score based on multiple factors to decide whether we should remove something from the cache. Potential metrics that could go into the score are:
Last use date
Zoom level (favor lower zooms as they cover more area)
Could it be an option to have different eviction strategies? As an start, the following two:
The current strategy.
A no evict strategy that basically has an empty evict method. The deleteRegion method will have to delete tiles exclusively to the deleted region, not just rely on the evict method. I do this in my app and it works well for such an offline heavy app.
Our offline database cache currently evicts tiles based on a least recently used strategy. With an API like #2006 that would allow prefetching tiles along a path or at a destination, we'd need the ability to control cache eviction to prevent those unused tiles from getting evicted from the cache.
We should think about whether we can instead calculate a score based on multiple factors to decide whether we should remove something from the cache. Potential metrics that could go into the score are:
/cc @d-prukop
The text was updated successfully, but these errors were encountered: