{"action":"created","issue":{"url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/98","repository_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus","labels_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/98/comments","events_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/98/events","html_url":"https://github.com/zzzprojects/EntityFramework-Plus/issues/98","id":195010484,"number":98,"title":"FromCacheAsync not async all the way through","user":{"login":"nphmuller","id":3781551,"avatar_url":"https://avatars.githubusercontent.com/u/3781551?v=3","gravatar_id":"","url":"https://api.github.com/users/nphmuller","html_url":"https://github.com/nphmuller","followers_url":"https://api.github.com/users/nphmuller/followers","following_url":"https://api.github.com/users/nphmuller/following{/other_user}","gists_url":"https://api.github.com/users/nphmuller/gists{/gist_id}","starred_url":"https://api.github.com/users/nphmuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nphmuller/subscriptions","organizations_url":"https://api.github.com/users/nphmuller/orgs","repos_url":"https://api.github.com/users/nphmuller/repos","events_url":"https://api.github.com/users/nphmuller/events{/privacy}","received_events_url":"https://api.github.com/users/nphmuller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"zzzprojects","id":11062426,"avatar_url":"https://avatars.githubusercontent.com/u/11062426?v=3","gravatar_id":"","url":"https://api.github.com/users/zzzprojects","html_url":"https://github.com/zzzprojects","followers_url":"https://api.github.com/users/zzzprojects/followers","following_url":"https://api.github.com/users/zzzprojects/following{/other_user}","gists_url":"https://api.github.com/users/zzzprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzprojects/subscriptions","organizations_url":"https://api.github.com/users/zzzprojects/orgs","repos_url":"https://api.github.com/users/zzzprojects/repos","events_url":"https://api.github.com/users/zzzprojects/events{/privacy}","received_events_url":"https://api.github.com/users/zzzprojects/received_events","type":"User","site_admin":false},"assignees":[{"login":"zzzprojects","id":11062426,"avatar_url":"https://avatars.githubusercontent.com/u/11062426?v=3","gravatar_id":"","url":"https://api.github.com/users/zzzprojects","html_url":"https://github.com/zzzprojects","followers_url":"https://api.github.com/users/zzzprojects/followers","following_url":"https://api.github.com/users/zzzprojects/following{/other_user}","gists_url":"https://api.github.com/users/zzzprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzprojects/subscriptions","organizations_url":"https://api.github.com/users/zzzprojects/orgs","repos_url":"https://api.github.com/users/zzzprojects/repos","events_url":"https://api.github.com/users/zzzprojects/events{/privacy}","received_events_url":"https://api.github.com/users/zzzprojects/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-12-12T15:56:55Z","updated_at":"2016-12-14T13:34:07Z","closed_at":null,"body":"First of all: sorry for all the issues and comments lately. Been thoroughly checking EFPlus out to see if we can incorporate it into our projects.\r\n\r\nI checked out the FromCache async extension methods (on EF6 net462), and I noticed two things:\r\n1. The cache call is wrapped in Task.Run, so the result is not retrieved async.\r\nThis can be expected, because in netfull ObjectCache is used, which does have async overloads. And the only equivalent that _does_ have async overloads is IDistributedCache, which is .NET Core only. Sadly this would make it impossible to implement, for example, Redis in an async way.\r\n2. If the cache hit misses, the actual database call is also not async (Example: ToList() is used instead of ToListAsync().\r\n\r\nAm I correct here, or missing something? If I'm correct you can see this issue as a feature request. 😀 "},"comment":{"url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/comments/267034714","html_url":"https://github.com/zzzprojects/EntityFramework-Plus/issues/98#issuecomment-267034714","issue_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/98","id":267034714,"user":{"login":"zzzprojects","id":11062426,"avatar_url":"https://avatars.githubusercontent.com/u/11062426?v=3","gravatar_id":"","url":"https://api.github.com/users/zzzprojects","html_url":"https://github.com/zzzprojects","followers_url":"https://api.github.com/users/zzzprojects/followers","following_url":"https://api.github.com/users/zzzprojects/following{/other_user}","gists_url":"https://api.github.com/users/zzzprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzprojects/subscriptions","organizations_url":"https://api.github.com/users/zzzprojects/orgs","repos_url":"https://api.github.com/users/zzzprojects/repos","events_url":"https://api.github.com/users/zzzprojects/events{/privacy}","received_events_url":"https://api.github.com/users/zzzprojects/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T13:34:07Z","updated_at":"2016-12-14T13:34:07Z","body":"Thank you for your link.\r\n\r\nI will for sure read them. I just need to convince myself and make sure I understand correctly the difference and why I should always use async task over Task.Run.\r\n\r\nBtw, this may not be your case but most applications I have seen, developers I have talked, stack overflow questions I have answered often use way more than 6000 records for the caching. But hey! They were already using ToListAsync before, so they will not really be penalized anyway\r\n\r\nWell, I guess I have some reading to do now ;)"}}
{"actor":{"display_login":"zzzprojects"}}