{"action":"created","issue":{"url":"https://api.github.com/repos/evanshortiss/express-expeditious/issues/21","repository_url":"https://api.github.com/repos/evanshortiss/express-expeditious","labels_url":"https://api.github.com/repos/evanshortiss/express-expeditious/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/evanshortiss/express-expeditious/issues/21/comments","events_url":"https://api.github.com/repos/evanshortiss/express-expeditious/issues/21/events","html_url":"https://github.com/evanshortiss/express-expeditious/issues/21","id":330816811,"node_id":"MDU6SXNzdWUzMzA4MTY4MTE=","number":21,"title":"Cacheable based on backend response?","user":{"login":"ryanto","id":89411,"node_id":"MDQ6VXNlcjg5NDEx","avatar_url":"https://avatars3.githubusercontent.com/u/89411?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanto","html_url":"https://github.com/ryanto","followers_url":"https://api.github.com/users/ryanto/followers","following_url":"https://api.github.com/users/ryanto/following{/other_user}","gists_url":"https://api.github.com/users/ryanto/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanto/subscriptions","organizations_url":"https://api.github.com/users/ryanto/orgs","repos_url":"https://api.github.com/users/ryanto/repos","events_url":"https://api.github.com/users/ryanto/events{/privacy}","received_events_url":"https://api.github.com/users/ryanto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-08T22:06:44Z","updated_at":"2018-06-13T23:34:18Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Would there be interest in an option to check a response for cachablility before writing it to the cache?\r\n\r\nThis sort of already happens by checking the response status code against `getCacheExpiry` before committing it. https://github.com/evanshortiss/express-expeditious/blob/master/lib/middleware.js#L136\r\n\r\nIt would be nice if other information in the response could be used to determine if a response is cacheable, like `Cache-Control` or other headers provided by the backend.\r\n\r\nSomething like `withResponseCondition(function)`\r\n\r\nI'm happy to get started on this if there's interest."},"comment":{"url":"https://api.github.com/repos/evanshortiss/express-expeditious/issues/comments/397120668","html_url":"https://github.com/evanshortiss/express-expeditious/issues/21#issuecomment-397120668","issue_url":"https://api.github.com/repos/evanshortiss/express-expeditious/issues/21","id":397120668,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzEyMDY2OA==","user":{"login":"ryanto","id":89411,"node_id":"MDQ6VXNlcjg5NDEx","avatar_url":"https://avatars3.githubusercontent.com/u/89411?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanto","html_url":"https://github.com/ryanto","followers_url":"https://api.github.com/users/ryanto/followers","following_url":"https://api.github.com/users/ryanto/following{/other_user}","gists_url":"https://api.github.com/users/ryanto/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanto/subscriptions","organizations_url":"https://api.github.com/users/ryanto/orgs","repos_url":"https://api.github.com/users/ryanto/repos","events_url":"https://api.github.com/users/ryanto/events{/privacy}","received_events_url":"https://api.github.com/users/ryanto/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T23:34:18Z","updated_at":"2018-06-13T23:34:18Z","author_association":"CONTRIBUTOR","body":"Yup exactly. I'll start a PR in the next few weeks."}}
{"actor":{"display_login":"ryanto"}}