{"action":"created","issue":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/1013","repository_url":"https://api.github.com/repos/onevcat/Kingfisher","labels_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/1013/labels{/name}","comments_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/1013/comments","events_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/1013/events","html_url":"https://github.com/onevcat/Kingfisher/issues/1013","id":360991630,"node_id":"MDU6SXNzdWUzNjA5OTE2MzA=","number":1013,"title":"Feature request: Make it possible to push only the original data to ImageCache","user":{"login":"swftvsn","id":25097010,"node_id":"MDQ6VXNlcjI1MDk3MDEw","avatar_url":"https://avatars2.githubusercontent.com/u/25097010?v=4","gravatar_id":"","url":"https://api.github.com/users/swftvsn","html_url":"https://github.com/swftvsn","followers_url":"https://api.github.com/users/swftvsn/followers","following_url":"https://api.github.com/users/swftvsn/following{/other_user}","gists_url":"https://api.github.com/users/swftvsn/gists{/gist_id}","starred_url":"https://api.github.com/users/swftvsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swftvsn/subscriptions","organizations_url":"https://api.github.com/users/swftvsn/orgs","repos_url":"https://api.github.com/users/swftvsn/repos","events_url":"https://api.github.com/users/swftvsn/events{/privacy}","received_events_url":"https://api.github.com/users/swftvsn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-17T18:36:21Z","updated_at":"2018-09-18T13:54:53Z","closed_at":null,"author_association":"NONE","body":"### Check List\r\n\r\nThanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.\r\n\r\n- [ X ] I have read the [wiki page](https://github.com/onevcat/Kingfisher/wiki) and [cheat sheet](https://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet), but there is no information I need.\r\n- [ X ] I have searched in [existing issues](https://github.com/onevcat/Kingfisher/issues?utf8=✓&q=is%3Aissue), but did not find a same one.\r\n- [ X ] I want to report a problem instead of asking a question. It'd better to use [kingfisher tag in Stack Overflow](http://stackoverflow.com/questions/tagged/kingfisher) to ask a question.\r\n\r\n### Issue Description\r\n\r\nIt's a bit hard to save data to cache. That is, I receive data from subsystem, but don't have any associated UIImage available. This forces me to create uiimage for no purpose.\r\n\r\n#### What\r\n\r\nIt would be nice to be able to do this:\r\n\r\n```swift\r\nfunc cacheData(url: String, data: Data) {\r\n    ImageCache.default.storeOriginal(data, forKey: url)\r\n}\r\n```\r\n\r\nAnd then just let Kingfisher load the image, it would find out that there is no image yet for the processors, but it seems that original image data can be found.\r\n\r\nIf I have missed a way to do this, please advice? Any workarounds are also greatly appreciated!\r\n"},"comment":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/comments/422402562","html_url":"https://github.com/onevcat/Kingfisher/issues/1013#issuecomment-422402562","issue_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/1013","id":422402562,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjQwMjU2Mg==","user":{"login":"onevcat","id":1019875,"node_id":"MDQ6VXNlcjEwMTk4NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1019875?v=4","gravatar_id":"","url":"https://api.github.com/users/onevcat","html_url":"https://github.com/onevcat","followers_url":"https://api.github.com/users/onevcat/followers","following_url":"https://api.github.com/users/onevcat/following{/other_user}","gists_url":"https://api.github.com/users/onevcat/gists{/gist_id}","starred_url":"https://api.github.com/users/onevcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onevcat/subscriptions","organizations_url":"https://api.github.com/users/onevcat/orgs","repos_url":"https://api.github.com/users/onevcat/repos","events_url":"https://api.github.com/users/onevcat/events{/privacy}","received_events_url":"https://api.github.com/users/onevcat/received_events","type":"User","site_admin":false},"created_at":"2018-09-18T13:54:53Z","updated_at":"2018-09-18T13:54:53Z","author_association":"OWNER","body":"Yes, you are right. A method for storing raw data only would be useful. I think I would add it later.\r\n\r\nFor now, the code snippet you posted should work perfectly, except that it creates and cache the image object in memory even you do not need it yet.\r\n"}}
{"actor":{"display_login":"onevcat"}}