{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1255","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1255/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1255/events","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/1255","id":67710046,"number":1255,"title":"cache parsed tiles","user":{"login":"ansis","id":1421652,"avatar_url":"https://avatars.githubusercontent.com/u/1421652?v=3","gravatar_id":"","url":"https://api.github.com/users/ansis","html_url":"https://github.com/ansis","followers_url":"https://api.github.com/users/ansis/followers","following_url":"https://api.github.com/users/ansis/following{/other_user}","gists_url":"https://api.github.com/users/ansis/gists{/gist_id}","starred_url":"https://api.github.com/users/ansis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansis/subscriptions","organizations_url":"https://api.github.com/users/ansis/orgs","repos_url":"https://api.github.com/users/ansis/repos","events_url":"https://api.github.com/users/ansis/events{/privacy}","received_events_url":"https://api.github.com/users/ansis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-11T00:25:05Z","updated_at":"2015-04-11T00:46:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/pulls/1255","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/1255","diff_url":"https://github.com/mapbox/mapbox-gl-native/pull/1255.diff","patch_url":"https://github.com/mapbox/mapbox-gl-native/pull/1255.patch"},"body":"implements https://github.com/mapbox/mapbox-gl-native/issues/1157\r\n\r\nThe cache stores the 20 most recently used but not visible tiles.\r\n\r\nOn iOS it clears the cache completely when it receives a memory warning.\r\n\r\n20 isn't a carefully picked number. It's just what -js uses. It seems reasonable. Each tile seems to be roughly ~1.5 MB. I haven't measured carefully, but that's 1/20th of how much the simulator's memory usage drops by when the warning is triggered.\r\n\r\nIs 20 good or could we cache even more?"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/91730601","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/1255#issuecomment-91730601","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1255","id":91730601,"user":{"login":"gundersen","id":93353,"avatar_url":"https://avatars.githubusercontent.com/u/93353?v=3","gravatar_id":"","url":"https://api.github.com/users/gundersen","html_url":"https://github.com/gundersen","followers_url":"https://api.github.com/users/gundersen/followers","following_url":"https://api.github.com/users/gundersen/following{/other_user}","gists_url":"https://api.github.com/users/gundersen/gists{/gist_id}","starred_url":"https://api.github.com/users/gundersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gundersen/subscriptions","organizations_url":"https://api.github.com/users/gundersen/orgs","repos_url":"https://api.github.com/users/gundersen/repos","events_url":"https://api.github.com/users/gundersen/events{/privacy}","received_events_url":"https://api.github.com/users/gundersen/received_events","type":"User","site_admin":false},"created_at":"2015-04-11T00:46:26Z","updated_at":"2015-04-11T00:46:26Z","body":":boom: "}}