{"action":"created","issue":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1688","repository_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1688/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1688/comments","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1688/events","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1688","id":168386566,"number":1688,"title":"Added Caching Framework","user":{"login":"demgod","id":7265642,"avatar_url":"https://avatars.githubusercontent.com/u/7265642?v=3","gravatar_id":"","url":"https://api.github.com/users/demgod","html_url":"https://github.com/demgod","followers_url":"https://api.github.com/users/demgod/followers","following_url":"https://api.github.com/users/demgod/following{/other_user}","gists_url":"https://api.github.com/users/demgod/gists{/gist_id}","starred_url":"https://api.github.com/users/demgod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demgod/subscriptions","organizations_url":"https://api.github.com/users/demgod/orgs","repos_url":"https://api.github.com/users/demgod/repos","events_url":"https://api.github.com/users/demgod/events{/privacy}","received_events_url":"https://api.github.com/users/demgod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-29T18:33:32Z","updated_at":"2016-07-29T18:56:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/1688","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1688","diff_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1688.diff","patch_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1688.patch"},"body":"Short Description: Rough framework for caching, further iterations will place objects in their own databases that are maintained for the session.\r\n\r\nCaches responses (i.e. GET_MAP_OBJECTS) and stores the resulting json data in a CacheObject for later use. For example:\r\n`player_cache = Cache.get('GET_PLAYER')`\r\n`print(player_cache.data) # prints the json data associated with the GET_PLAYER response`\r\n`print(player_cache.time_stamp) # prints the unix time stamp of when we received this data`\r\n`print(player_cache.age()) # prints the number of seconds that have passed since we received it`\r\n`print(player_cache.is_outdated(60)) # return true if its age is > 60 seconds, otherwise false`\r\n`\r\n\r\nFixes:\r\n- Needlessly requesting updated information on Inventory, Pokemon, Gyms, Forts, etc. when nothing has changed."},"comment":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/comments/236264908","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1688#issuecomment-236264908","issue_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1688","id":236264908,"user":{"login":"demgod","id":7265642,"avatar_url":"https://avatars.githubusercontent.com/u/7265642?v=3","gravatar_id":"","url":"https://api.github.com/users/demgod","html_url":"https://github.com/demgod","followers_url":"https://api.github.com/users/demgod/followers","following_url":"https://api.github.com/users/demgod/following{/other_user}","gists_url":"https://api.github.com/users/demgod/gists{/gist_id}","starred_url":"https://api.github.com/users/demgod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demgod/subscriptions","organizations_url":"https://api.github.com/users/demgod/orgs","repos_url":"https://api.github.com/users/demgod/repos","events_url":"https://api.github.com/users/demgod/events{/privacy}","received_events_url":"https://api.github.com/users/demgod/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T18:56:30Z","updated_at":"2016-07-29T18:56:30Z","body":"In theory, since we're always provided in the response with items we receive, we should only ever request the inventory once and then modify the inventory as need when we expend or receive items. Additionally a cache for forts, gyms, and pokemon would allow for referencing game objects that we've seen in the past. For example, it currently seems like we request updated fort/gym information just about every second."}}
{"actor":{"display_login":"demgod"}}