Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[core] Add API for invalidating tiles - #14702

Merged
tmpsantos merged 3 commits into
masterfrom
tmpsantos-offline_invalidate
May 20, 2019
Merged

tmpsantos merged 3 commits into
masterfrom
tmpsantos-offline_invalidate

Conversation

@tmpsantos

Copy link
Copy Markdown
Contributor

Add new APIs for invalidating tiles, effectively forcing Mapbox GL Native to check with the servers if the tiles are valid before using them. This is more efficient then deleting tiles, because in case of valid tiles, they won't get downloaded.

Fixes #4376.

@tmpsantos tmpsantos self-assigned this May 17, 2019
@tmpsantos
tmpsantos force-pushed the tmpsantos-offline_invalidate branch from 3a7ac91 to eb67eae Compare May 17, 2019 15:27

@julianrex julianrex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@zugaldia

Copy link
Copy Markdown
Member

If I'm understanding this correctly, this PR addresses the possibility of invalidating tiles, but it doesn't address the part of apps being able to reclaim the space taken by those invalidated tiles as described on #4376, right?

Comment thread test/storage/offline_database.test.cpp Resolved
tmpsantos added 2 commits May 20, 2019 11:37
Add new APIs for invalidating tiles, effectively forcing Mapbox
GL Native to check with the servers if the tiles are valid before
using them. This is more efficient then deleting tiles, because
in case of valid tiles, they won't get downloaded.

Fixes #4376.
@tmpsantos
tmpsantos force-pushed the tmpsantos-offline_invalidate branch from eb67eae to e1590a1 Compare May 20, 2019 10:46
@tmpsantos

Copy link
Copy Markdown
Contributor Author

but it doesn't address the part of apps being able to reclaim the space taken by those invalidated tiles as described on #4376, right?

Correct, this will come on a follow-up PR for changing the cache size.

@tmpsantos
tmpsantos force-pushed the tmpsantos-offline_invalidate branch from 44efa24 to 1d1704f Compare May 20, 2019 14:51
@tmpsantos
tmpsantos merged commit 88ef7d8 into master May 20, 2019
@tmpsantos
tmpsantos deleted the tmpsantos-offline_invalidate branch May 20, 2019 22:04
@friedbunny friedbunny added this to the release-oolong milestone May 21, 2019
@chloekraw

Copy link
Copy Markdown
Contributor

Add new APIs for invalidating tiles, effectively forcing Mapbox GL Native to check with the servers if the tiles are valid before using them

@tmpsantos, quick clarification question - does this PR ask the renderer to always check with the servers whether tiles are valid before using them, or does it only check for tiles that a developer has programmatically marked as invalid?

@tmpsantos

Copy link
Copy Markdown
Contributor Author

@tmpsantos, quick clarification question - does this PR ask the renderer to always check with the servers whether tiles are valid before using them, or does it only check for tiles that a developer has programmatically marked as invalid?

If you invalidate the ambient cache with DefaultFileSource::invalidateAmbientCache(), from that moment, it will always check with the servers before rendering the tile. If you are offline, you won't see any map.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API to clear ambient cache

7 participants