{"action":"published","release":{"url":"https://api.github.com/repos/TonyTangAndroid/android-volley/releases/1407251","assets_url":"https://api.github.com/repos/TonyTangAndroid/android-volley/releases/1407251/assets","upload_url":"https://uploads.github.com/repos/TonyTangAndroid/android-volley/releases/1407251/assets{?name}","html_url":"https://github.com/TonyTangAndroid/android-volley/releases/tag/1.0.20","id":1407251,"tag_name":"1.0.20","target_commitish":"master","name":"1.0.20","draft":false,"author":{"login":"TonyTangAndroid","id":8612724,"avatar_url":"https://avatars.githubusercontent.com/u/8612724?v=3","gravatar_id":"","url":"https://api.github.com/users/TonyTangAndroid","html_url":"https://github.com/TonyTangAndroid","followers_url":"https://api.github.com/users/TonyTangAndroid/followers","following_url":"https://api.github.com/users/TonyTangAndroid/following{/other_user}","gists_url":"https://api.github.com/users/TonyTangAndroid/gists{/gist_id}","starred_url":"https://api.github.com/users/TonyTangAndroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TonyTangAndroid/subscriptions","organizations_url":"https://api.github.com/users/TonyTangAndroid/orgs","repos_url":"https://api.github.com/users/TonyTangAndroid/repos","events_url":"https://api.github.com/users/TonyTangAndroid/events{/privacy}","received_events_url":"https://api.github.com/users/TonyTangAndroid/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2015-06-11T13:33:08Z","published_at":"2015-06-12T03:10:53Z","assets":[],"tarball_url":"https://api.github.com/repos/TonyTangAndroid/android-volley/tarball/1.0.20","zipball_url":"https://api.github.com/repos/TonyTangAndroid/android-volley/zipball/1.0.20","body":"Provide the flexibility of cache and request related logic:\r\n\r\n1, add function couldUseCache() in Request.java to control whether the cache could be considered first before sending network request.\r\n\r\n2, add function isRefreshable() in Requeset.java to control whether the network request should be dispatched when cache exist.\r\n\r\n3, force use cache no matter when the request is not refreshable.\r\n\r\nComment: the above method comes in handy in the following situation:\r\nGenerally, when network is offline, it will be more user-friendly to show the cache of the request if the cache is applicable. However, after the response of cache is delivered but the request should be refreshed, the network request will be sent. Because the network is offline, so error will be returned which overrides the previous response from Cache.\r\n\r\nBy providing this method, we could decide whether we should send further network request so as to avoid error response while the cache is applicable."}}