{"action":"created","comment":{"url":"https://api.github.com/repos/radiosterne/DynaCache/pulls/comments/62040317","id":62040317,"diff_hunk":"@@ -30,21 +30,17 @@ public class MemoryCacheService : IDynaCacheService, IDisposable\n \t\t/// <param name=\"result\">The object that was read from the cache, or null if the key\n \t\t/// could not be found in the cache.</param>\n \t\t/// <returns><c>true</c> if the item could be read from the cache, otherwise <c>false</c>.</returns>\n-\t\tpublic virtual bool TryGetCachedObject(string cacheKey, out object result)\n+\t\tpublic virtual bool TryGetCachedObject<T>(string cacheKey, out T result)\n \t\t{\n-\t\t\tif (_cache.Contains(cacheKey))\n-\t\t\t{\n-\t\t\t\tresult = _cache[cacheKey];\n-\t\t\t\tif (Equals(result, NullReference))\n-\t\t\t\t{\n-\t\t\t\t\tresult = null;\n-\t\t\t\t}\n-\n-\t\t\t\treturn true;\n-\t\t\t}\n-\n-\t\t\tresult = null;\n-\t\t\treturn false;\n+\t\t\tresult = default(T);\n+\t\t\tif (!_cache.Contains(cacheKey))\n+\t\t\t\treturn false;\n+\t\t\tvar res = _cache[cacheKey];\n+\t\t\tif (!(res is T))\n+\t\t\t\treturn false;\n+\t\t\tif (!Equals(res, nullReference))","path":"DynaCache.MemoryCache/MemoryCacheService.cs","position":57,"original_position":57,"commit_id":"e34cde7b77cc6309f5e008e74e55a6c7bc5dd8de","original_commit_id":"e34cde7b77cc6309f5e008e74e55a6c7bc5dd8de","user":{"login":"radiosterne","id":1458866,"avatar_url":"https://avatars.githubusercontent.com/u/1458866?v=3","gravatar_id":"","url":"https://api.github.com/users/radiosterne","html_url":"https://github.com/radiosterne","followers_url":"https://api.github.com/users/radiosterne/followers","following_url":"https://api.github.com/users/radiosterne/following{/other_user}","gists_url":"https://api.github.com/users/radiosterne/gists{/gist_id}","starred_url":"https://api.github.com/users/radiosterne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radiosterne/subscriptions","organizations_url":"https://api.github.com/users/radiosterne/orgs","repos_url":"https://api.github.com/users/radiosterne/repos","events_url":"https://api.github.com/users/radiosterne/events{/privacy}","received_events_url":"https://api.github.com/users/radiosterne/received_events","type":"User","site_admin":false},"body":"+","created_at":"2016-05-04T13:42:05Z","updated_at":"2016-05-04T13:42:05Z","html_url":"https://github.com/radiosterne/DynaCache/pull/1#discussion_r62040317","pull_request_url":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/radiosterne/DynaCache/pulls/comments/62040317"},"html":{"href":"https://github.com/radiosterne/DynaCache/pull/1#discussion_r62040317"},"pull_request":{"href":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1","id":67911238,"html_url":"https://github.com/radiosterne/DynaCache/pull/1","diff_url":"https://github.com/radiosterne/DynaCache/pull/1.diff","patch_url":"https://github.com/radiosterne/DynaCache/pull/1.patch","issue_url":"https://api.github.com/repos/radiosterne/DynaCache/issues/1","number":1,"state":"open","locked":false,"title":"Feature/multilevel redis cache","user":{"login":"sokolovsv90","id":18113753,"avatar_url":"https://avatars.githubusercontent.com/u/18113753?v=3","gravatar_id":"","url":"https://api.github.com/users/sokolovsv90","html_url":"https://github.com/sokolovsv90","followers_url":"https://api.github.com/users/sokolovsv90/followers","following_url":"https://api.github.com/users/sokolovsv90/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsv90/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsv90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsv90/subscriptions","organizations_url":"https://api.github.com/users/sokolovsv90/orgs","repos_url":"https://api.github.com/users/sokolovsv90/repos","events_url":"https://api.github.com/users/sokolovsv90/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsv90/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-26T15:53:53Z","updated_at":"2016-05-04T13:42:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8044c0dd22460edee387d805f883c9199959d4d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1/commits","review_comments_url":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1/comments","review_comment_url":"https://api.github.com/repos/radiosterne/DynaCache/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radiosterne/DynaCache/issues/1/comments","statuses_url":"https://api.github.com/repos/radiosterne/DynaCache/statuses/e34cde7b77cc6309f5e008e74e55a6c7bc5dd8de","head":{"label":"sokolovsv90:feature/multilevel-redis-cache","ref":"feature/multilevel-redis-cache","sha":"e34cde7b77cc6309f5e008e74e55a6c7bc5dd8de","user":{"login":"sokolovsv90","id":18113753,"avatar_url":"https://avatars.githubusercontent.com/u/18113753?v=3","gravatar_id":"","url":"https://api.github.com/users/sokolovsv90","html_url":"https://github.com/sokolovsv90","followers_url":"https://api.github.com/users/sokolovsv90/followers","following_url":"https://api.github.com/users/sokolovsv90/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsv90/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsv90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsv90/subscriptions","organizations_url":"https://api.github.com/users/sokolovsv90/orgs","repos_url":"https://api.github.com/users/sokolovsv90/repos","events_url":"https://api.github.com/users/sokolovsv90/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsv90/received_events","type":"User","site_admin":false},"repo":{"id":57113672,"name":"DynaCache","full_name":"sokolovsv90/DynaCache","owner":{"login":"sokolovsv90","id":18113753,"avatar_url":"https://avatars.githubusercontent.com/u/18113753?v=3","gravatar_id":"","url":"https://api.github.com/users/sokolovsv90","html_url":"https://github.com/sokolovsv90","followers_url":"https://api.github.com/users/sokolovsv90/followers","following_url":"https://api.github.com/users/sokolovsv90/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsv90/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsv90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsv90/subscriptions","organizations_url":"https://api.github.com/users/sokolovsv90/orgs","repos_url":"https://api.github.com/users/sokolovsv90/repos","events_url":"https://api.github.com/users/sokolovsv90/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsv90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sokolovsv90/DynaCache","description":"","fork":true,"url":"https://api.github.com/repos/sokolovsv90/DynaCache","forks_url":"https://api.github.com/repos/sokolovsv90/DynaCache/forks","keys_url":"https://api.github.com/repos/sokolovsv90/DynaCache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sokolovsv90/DynaCache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sokolovsv90/DynaCache/teams","hooks_url":"https://api.github.com/repos/sokolovsv90/DynaCache/hooks","issue_events_url":"https://api.github.com/repos/sokolovsv90/DynaCache/issues/events{/number}","events_url":"https://api.github.com/repos/sokolovsv90/DynaCache/events","assignees_url":"https://api.github.com/repos/sokolovsv90/DynaCache/assignees{/user}","branches_url":"https://api.github.com/repos/sokolovsv90/DynaCache/branches{/branch}","tags_url":"https://api.github.com/repos/sokolovsv90/DynaCache/tags","blobs_url":"https://api.github.com/repos/sokolovsv90/DynaCache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sokolovsv90/DynaCache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sokolovsv90/DynaCache/git/refs{/sha}","trees_url":"https://api.github.com/repos/sokolovsv90/DynaCache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sokolovsv90/DynaCache/statuses/{sha}","languages_url":"https://api.github.com/repos/sokolovsv90/DynaCache/languages","stargazers_url":"https://api.github.com/repos/sokolovsv90/DynaCache/stargazers","contributors_url":"https://api.github.com/repos/sokolovsv90/DynaCache/contributors","subscribers_url":"https://api.github.com/repos/sokolovsv90/DynaCache/subscribers","subscription_url":"https://api.github.com/repos/sokolovsv90/DynaCache/subscription","commits_url":"https://api.github.com/repos/sokolovsv90/DynaCache/commits{/sha}","git_commits_url":"https://api.github.com/repos/sokolovsv90/DynaCache/git/commits{/sha}","comments_url":"https://api.github.com/repos/sokolovsv90/DynaCache/comments{/number}","issue_comment_url":"https://api.github.com/repos/sokolovsv90/DynaCache/issues/comments{/number}","contents_url":"https://api.github.com/repos/sokolovsv90/DynaCache/contents/{+path}","compare_url":"https://api.github.com/repos/sokolovsv90/DynaCache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sokolovsv90/DynaCache/merges","archive_url":"https://api.github.com/repos/sokolovsv90/DynaCache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sokolovsv90/DynaCache/downloads","issues_url":"https://api.github.com/repos/sokolovsv90/DynaCache/issues{/number}","pulls_url":"https://api.github.com/repos/sokolovsv90/DynaCache/pulls{/number}","milestones_url":"https://api.github.com/repos/sokolovsv90/DynaCache/milestones{/number}","notifications_url":"https://api.github.com/repos/sokolovsv90/DynaCache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sokolovsv90/DynaCache/labels{/name}","releases_url":"https://api.github.com/repos/sokolovsv90/DynaCache/releases{/id}","deployments_url":"https://api.github.com/repos/sokolovsv90/DynaCache/deployments","created_at":"2016-04-26T09:03:04Z","updated_at":"2016-04-26T09:03:06Z","pushed_at":"2016-04-26T15:51:55Z","git_url":"git://github.com/sokolovsv90/DynaCache.git","ssh_url":"git@github.com:sokolovsv90/DynaCache.git","clone_url":"https://github.com/sokolovsv90/DynaCache.git","svn_url":"https://github.com/sokolovsv90/DynaCache","homepage":null,"size":4654,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"radiosterne:master","ref":"master","sha":"5a47c73510762b19b994d8abea135ad6b8976f30","user":{"login":"radiosterne","id":1458866,"avatar_url":"https://avatars.githubusercontent.com/u/1458866?v=3","gravatar_id":"","url":"https://api.github.com/users/radiosterne","html_url":"https://github.com/radiosterne","followers_url":"https://api.github.com/users/radiosterne/followers","following_url":"https://api.github.com/users/radiosterne/following{/other_user}","gists_url":"https://api.github.com/users/radiosterne/gists{/gist_id}","starred_url":"https://api.github.com/users/radiosterne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radiosterne/subscriptions","organizations_url":"https://api.github.com/users/radiosterne/orgs","repos_url":"https://api.github.com/users/radiosterne/repos","events_url":"https://api.github.com/users/radiosterne/events{/privacy}","received_events_url":"https://api.github.com/users/radiosterne/received_events","type":"User","site_admin":false},"repo":{"id":27736948,"name":"DynaCache","full_name":"radiosterne/DynaCache","owner":{"login":"radiosterne","id":1458866,"avatar_url":"https://avatars.githubusercontent.com/u/1458866?v=3","gravatar_id":"","url":"https://api.github.com/users/radiosterne","html_url":"https://github.com/radiosterne","followers_url":"https://api.github.com/users/radiosterne/followers","following_url":"https://api.github.com/users/radiosterne/following{/other_user}","gists_url":"https://api.github.com/users/radiosterne/gists{/gist_id}","starred_url":"https://api.github.com/users/radiosterne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radiosterne/subscriptions","organizations_url":"https://api.github.com/users/radiosterne/orgs","repos_url":"https://api.github.com/users/radiosterne/repos","events_url":"https://api.github.com/users/radiosterne/events{/privacy}","received_events_url":"https://api.github.com/users/radiosterne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/radiosterne/DynaCache","description":"","fork":false,"url":"https://api.github.com/repos/radiosterne/DynaCache","forks_url":"https://api.github.com/repos/radiosterne/DynaCache/forks","keys_url":"https://api.github.com/repos/radiosterne/DynaCache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radiosterne/DynaCache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radiosterne/DynaCache/teams","hooks_url":"https://api.github.com/repos/radiosterne/DynaCache/hooks","issue_events_url":"https://api.github.com/repos/radiosterne/DynaCache/issues/events{/number}","events_url":"https://api.github.com/repos/radiosterne/DynaCache/events","assignees_url":"https://api.github.com/repos/radiosterne/DynaCache/assignees{/user}","branches_url":"https://api.github.com/repos/radiosterne/DynaCache/branches{/branch}","tags_url":"https://api.github.com/repos/radiosterne/DynaCache/tags","blobs_url":"https://api.github.com/repos/radiosterne/DynaCache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radiosterne/DynaCache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radiosterne/DynaCache/git/refs{/sha}","trees_url":"https://api.github.com/repos/radiosterne/DynaCache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radiosterne/DynaCache/statuses/{sha}","languages_url":"https://api.github.com/repos/radiosterne/DynaCache/languages","stargazers_url":"https://api.github.com/repos/radiosterne/DynaCache/stargazers","contributors_url":"https://api.github.com/repos/radiosterne/DynaCache/contributors","subscribers_url":"https://api.github.com/repos/radiosterne/DynaCache/subscribers","subscription_url":"https://api.github.com/repos/radiosterne/DynaCache/subscription","commits_url":"https://api.github.com/repos/radiosterne/DynaCache/commits{/sha}","git_commits_url":"https://api.github.com/repos/radiosterne/DynaCache/git/commits{/sha}","comments_url":"https://api.github.com/repos/radiosterne/DynaCache/comments{/number}","issue_comment_url":"https://api.github.com/repos/radiosterne/DynaCache/issues/comments{/number}","contents_url":"https://api.github.com/repos/radiosterne/DynaCache/contents/{+path}","compare_url":"https://api.github.com/repos/radiosterne/DynaCache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radiosterne/DynaCache/merges","archive_url":"https://api.github.com/repos/radiosterne/DynaCache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radiosterne/DynaCache/downloads","issues_url":"https://api.github.com/repos/radiosterne/DynaCache/issues{/number}","pulls_url":"https://api.github.com/repos/radiosterne/DynaCache/pulls{/number}","milestones_url":"https://api.github.com/repos/radiosterne/DynaCache/milestones{/number}","notifications_url":"https://api.github.com/repos/radiosterne/DynaCache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radiosterne/DynaCache/labels{/name}","releases_url":"https://api.github.com/repos/radiosterne/DynaCache/releases{/id}","deployments_url":"https://api.github.com/repos/radiosterne/DynaCache/deployments","created_at":"2014-12-08T21:50:48Z","updated_at":"2014-12-15T21:23:22Z","pushed_at":"2016-04-26T15:53:53Z","git_url":"git://github.com/radiosterne/DynaCache.git","ssh_url":"git@github.com:radiosterne/DynaCache.git","clone_url":"https://github.com/radiosterne/DynaCache.git","svn_url":"https://github.com/radiosterne/DynaCache","homepage":null,"size":4840,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1"},"html":{"href":"https://github.com/radiosterne/DynaCache/pull/1"},"issue":{"href":"https://api.github.com/repos/radiosterne/DynaCache/issues/1"},"comments":{"href":"https://api.github.com/repos/radiosterne/DynaCache/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/radiosterne/DynaCache/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radiosterne/DynaCache/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/radiosterne/DynaCache/statuses/e34cde7b77cc6309f5e008e74e55a6c7bc5dd8de"}}}}