{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8041","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8041/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8041/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8041/events","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/8041","id":207330756,"number":8041,"title":"[ios] Feature/cachebykey","user":{"login":"wibge","id":151111,"avatar_url":"https://avatars.githubusercontent.com/u/151111?v=3","gravatar_id":"","url":"https://api.github.com/users/wibge","html_url":"https://github.com/wibge","followers_url":"https://api.github.com/users/wibge/followers","following_url":"https://api.github.com/users/wibge/following{/other_user}","gists_url":"https://api.github.com/users/wibge/gists{/gist_id}","starred_url":"https://api.github.com/users/wibge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wibge/subscriptions","organizations_url":"https://api.github.com/users/wibge/orgs","repos_url":"https://api.github.com/users/wibge/repos","events_url":"https://api.github.com/users/wibge/events{/privacy}","received_events_url":"https://api.github.com/users/wibge/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-13T20:30:58Z","updated_at":"2017-02-13T23:09:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/pulls/8041","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/8041","diff_url":"https://github.com/mapbox/mapbox-gl-native/pull/8041.diff","patch_url":"https://github.com/mapbox/mapbox-gl-native/pull/8041.patch"},"body":"Added an optional cachekey for tilesets. If present, it is used instead of the url template for caching in the database. This is useful when tile servers urls changed, but you still want the offline cache to work. \r\n\r\nThis happens often for tile servers that have the access key as part of the url. But we've also used it before when changing USGS topographic servers or aerial imagery servers to different providers. \r\n\r\nYou specify the cacheKey in the tilejson and via a MGLTileSourceOption"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/279553867","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/8041#issuecomment-279553867","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8041","id":279553867,"user":{"login":"1ec5","id":1231218,"avatar_url":"https://avatars.githubusercontent.com/u/1231218?v=3","gravatar_id":"","url":"https://api.github.com/users/1ec5","html_url":"https://github.com/1ec5","followers_url":"https://api.github.com/users/1ec5/followers","following_url":"https://api.github.com/users/1ec5/following{/other_user}","gists_url":"https://api.github.com/users/1ec5/gists{/gist_id}","starred_url":"https://api.github.com/users/1ec5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ec5/subscriptions","organizations_url":"https://api.github.com/users/1ec5/orgs","repos_url":"https://api.github.com/users/1ec5/repos","events_url":"https://api.github.com/users/1ec5/events{/privacy}","received_events_url":"https://api.github.com/users/1ec5/received_events","type":"User","site_admin":false},"created_at":"2017-02-13T23:09:41Z","updated_at":"2017-02-13T23:09:41Z","body":"> This happens often for tile servers that have the access key as part of the url.\r\n\r\nPart of the motivation of #7485 was to generalize the handling of the Mapbox-specific `access_token` query parameter to work with other tile servers, so that you could keep an access key parameter out of the cache key – or indeed any parameter that should change without busting caches, such as a timestamp or campaign ID.\r\n\r\n> You specify the cacheKey in the tilejson and via a MGLTileSourceOption\r\n\r\nThe TileJSON format is defined in [this specification](https://github.com/mapbox/tilejson-spec/). It might be more convenient to define this option as an inline option in the style JSON format, similar to `tileSize`. It would still require a change to the [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-js/style-spec/), but that wouldn’t be quite as big of a deal."}}
{"actor":{"display_login":"1ec5"}}