Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cherry-pick caching fix #8389

Merged
merged 2 commits into from
Jun 24, 2019
Merged

cherry-pick caching fix #8389

merged 2 commits into from
Jun 24, 2019

Commits on Jun 24, 2019

  1. use browser Cache interface to cache tiles (#8363)

    Recent pricing changes introduced a `sku=` query parameter that changes with every map load. This defeats the browser's ability to cache these tiles. We're working around that by implementing our own caching with the new `Cache` api.
    
    - skips caching tiles that expire soon
    - only caches mapbox tiles (no 3rd party tiles, styles, etc because the browser should cache these fine)
    - does not work in IE, Safari
    
    Browser tests can be found in debug/cache_api.html
    
    mapboxgl.clearStorage added to provide a way to clear the cache.
    ansis committed Jun 24, 2019
    Configuration menu
    Copy the full SHA
    1271d90 View commit details
    Browse the repository at this point in the history
  2. fix cache support check for enforcing size limit

    This was throwing errors in browsers that don't support the cache api
    but wasn't previously noticed because it was not breaking anything.
    ansis committed Jun 24, 2019
    Configuration menu
    Copy the full SHA
    02e89ed View commit details
    Browse the repository at this point in the history