{"action":"created","comment":{"url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/comments/216650912","pull_request_review_id":154170927,"id":216650912,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjY1MDkxMg==","diff_hunk":"@@ -1,38 +1,152 @@\n+using RedLockNet.SERedis;\n+using RedLockNet.SERedis.Configuration;\n+using StackExchange.Redis;\n using System;\n using System.Collections.Generic;\n-using System.Data.Common;\n+using System.Diagnostics;\n using System.Linq;\n using System.Runtime.CompilerServices;\n using System.Security.Cryptography;\n using System.Text;\n using System.Text.RegularExpressions;\n-using StackExchange.Redis;\n+using System.Threading;\n+using RedLockNet;\n \n namespace EFCache.Redis\n {\n-\tpublic class RedisCache : IRedisCache\n+\t/// <inheritdoc cref=\"IRedisCache\" />\n+\t/// <inheritdoc cref=\"IDisposable\"/>\n+\t/// <summary>\n+\t/// This class implement ICache via IRedisCache. Provides for (potentially) atomic management of sql query result caching\n+\t/// via a mechanism of\n+\t/// a) Redis sets (one per entity set) containing references to keys for queries referencing\n+\t/// that entity set\n+\t/// b) Strings keyed on the hash of the sql query storing the result set\n+\t/// This class makes use of the RedLock algorithm https://redis.io/topics/distlock to offer a\n+\t/// mechanism for two phase-style commit via locks and lua scripts for writes to ensure\n+\t/// changes are atomic and can be serialized per entity set.\n+\t/// </summary>\n+\tpublic class RedisCache : IRedisCache, IDisposable\n \t{\n+\t\t#region Private Vars\n+\t\t// Prefixes for cache keys\n \t\tprivate const string DefaultCacheIdentifier = \"__EFCache.Redis_EntitySetKey_\";\n+\t\tprivate readonly string _cacheIdentifier;","path":"EFCache.Redis/RedisCache.cs","position":37,"original_position":37,"commit_id":"a7df8c749a19f3f914542f38d061664d580f9b21","original_commit_id":"a7df8c749a19f3f914542f38d061664d580f9b21","user":{"login":"builtbywill","id":689209,"node_id":"MDQ6VXNlcjY4OTIwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/689209?v=4","gravatar_id":"","url":"https://api.github.com/users/builtbywill","html_url":"https://github.com/builtbywill","followers_url":"https://api.github.com/users/builtbywill/followers","following_url":"https://api.github.com/users/builtbywill/following{/other_user}","gists_url":"https://api.github.com/users/builtbywill/gists{/gist_id}","starred_url":"https://api.github.com/users/builtbywill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/builtbywill/subscriptions","organizations_url":"https://api.github.com/users/builtbywill/orgs","repos_url":"https://api.github.com/users/builtbywill/repos","events_url":"https://api.github.com/users/builtbywill/events{/privacy}","received_events_url":"https://api.github.com/users/builtbywill/received_events","type":"User","site_admin":false},"body":"@jkdufair is `_cacheIdentifier` or `_statsIdentifier ` ever actually set? I see they are used in the util methods, but not where they are set.","created_at":"2018-09-11T12:33:31Z","updated_at":"2018-09-11T12:33:38Z","html_url":"https://github.com/purdue-tlt/EFCache.Redis/pull/4#discussion_r216650912","pull_request_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/comments/216650912"},"html":{"href":"https://github.com/purdue-tlt/EFCache.Redis/pull/4#discussion_r216650912"},"pull_request":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4","id":214434981,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NDM0OTgx","html_url":"https://github.com/purdue-tlt/EFCache.Redis/pull/4","diff_url":"https://github.com/purdue-tlt/EFCache.Redis/pull/4.diff","patch_url":"https://github.com/purdue-tlt/EFCache.Redis/pull/4.patch","issue_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/4","number":4,"state":"open","locked":false,"title":"Atomic Consistency Updates","user":{"login":"jkdufair","id":623494,"node_id":"MDQ6VXNlcjYyMzQ5NA==","avatar_url":"https://avatars2.githubusercontent.com/u/623494?v=4","gravatar_id":"","url":"https://api.github.com/users/jkdufair","html_url":"https://github.com/jkdufair","followers_url":"https://api.github.com/users/jkdufair/followers","following_url":"https://api.github.com/users/jkdufair/following{/other_user}","gists_url":"https://api.github.com/users/jkdufair/gists{/gist_id}","starred_url":"https://api.github.com/users/jkdufair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkdufair/subscriptions","organizations_url":"https://api.github.com/users/jkdufair/orgs","repos_url":"https://api.github.com/users/jkdufair/repos","events_url":"https://api.github.com/users/jkdufair/events{/privacy}","received_events_url":"https://api.github.com/users/jkdufair/received_events","type":"User","site_admin":false},"body":"- Lua scripting for atomic writes/deletes\r\n- RedLock mechanism to allow atomic writes/deletes of all affected entity sets","created_at":"2018-09-10T20:30:44Z","updated_at":"2018-09-11T12:33:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"495aef11c3f98009566f8d50f227edad075e409a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4/commits","review_comments_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4/comments","review_comment_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/4/comments","statuses_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/statuses/a7df8c749a19f3f914542f38d061664d580f9b21","head":{"label":"purdue-tlt:feature/progressive-retry","ref":"feature/progressive-retry","sha":"a7df8c749a19f3f914542f38d061664d580f9b21","user":{"login":"purdue-tlt","id":26013184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDEzMTg0","avatar_url":"https://avatars1.githubusercontent.com/u/26013184?v=4","gravatar_id":"","url":"https://api.github.com/users/purdue-tlt","html_url":"https://github.com/purdue-tlt","followers_url":"https://api.github.com/users/purdue-tlt/followers","following_url":"https://api.github.com/users/purdue-tlt/following{/other_user}","gists_url":"https://api.github.com/users/purdue-tlt/gists{/gist_id}","starred_url":"https://api.github.com/users/purdue-tlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purdue-tlt/subscriptions","organizations_url":"https://api.github.com/users/purdue-tlt/orgs","repos_url":"https://api.github.com/users/purdue-tlt/repos","events_url":"https://api.github.com/users/purdue-tlt/events{/privacy}","received_events_url":"https://api.github.com/users/purdue-tlt/received_events","type":"Organization","site_admin":false},"repo":{"id":126337742,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYzMzc3NDI=","name":"EFCache.Redis","full_name":"purdue-tlt/EFCache.Redis","owner":{"login":"purdue-tlt","id":26013184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDEzMTg0","avatar_url":"https://avatars1.githubusercontent.com/u/26013184?v=4","gravatar_id":"","url":"https://api.github.com/users/purdue-tlt","html_url":"https://github.com/purdue-tlt","followers_url":"https://api.github.com/users/purdue-tlt/followers","following_url":"https://api.github.com/users/purdue-tlt/following{/other_user}","gists_url":"https://api.github.com/users/purdue-tlt/gists{/gist_id}","starred_url":"https://api.github.com/users/purdue-tlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purdue-tlt/subscriptions","organizations_url":"https://api.github.com/users/purdue-tlt/orgs","repos_url":"https://api.github.com/users/purdue-tlt/repos","events_url":"https://api.github.com/users/purdue-tlt/events{/privacy}","received_events_url":"https://api.github.com/users/purdue-tlt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/purdue-tlt/EFCache.Redis","description":"Extends EFCache by adding Redis support","fork":true,"url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis","forks_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/forks","keys_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/teams","hooks_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/hooks","issue_events_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/events{/number}","events_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/events","assignees_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/assignees{/user}","branches_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/branches{/branch}","tags_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/tags","blobs_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/statuses/{sha}","languages_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/languages","stargazers_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/stargazers","contributors_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/contributors","subscribers_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/subscribers","subscription_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/subscription","commits_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/contents/{+path}","compare_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/merges","archive_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/downloads","issues_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues{/number}","pulls_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls{/number}","milestones_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/milestones{/number}","notifications_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/labels{/name}","releases_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/releases{/id}","deployments_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/deployments","created_at":"2018-03-22T13:15:59Z","updated_at":"2018-07-18T19:44:59Z","pushed_at":"2018-09-11T03:36:58Z","git_url":"git://github.com/purdue-tlt/EFCache.Redis.git","ssh_url":"git@github.com:purdue-tlt/EFCache.Redis.git","clone_url":"https://github.com/purdue-tlt/EFCache.Redis.git","svn_url":"https://github.com/purdue-tlt/EFCache.Redis","homepage":null,"size":1378,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"purdue-tlt:master","ref":"master","sha":"5126c5dac35845c3a94987bf34cddc37ae159f7e","user":{"login":"purdue-tlt","id":26013184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDEzMTg0","avatar_url":"https://avatars1.githubusercontent.com/u/26013184?v=4","gravatar_id":"","url":"https://api.github.com/users/purdue-tlt","html_url":"https://github.com/purdue-tlt","followers_url":"https://api.github.com/users/purdue-tlt/followers","following_url":"https://api.github.com/users/purdue-tlt/following{/other_user}","gists_url":"https://api.github.com/users/purdue-tlt/gists{/gist_id}","starred_url":"https://api.github.com/users/purdue-tlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purdue-tlt/subscriptions","organizations_url":"https://api.github.com/users/purdue-tlt/orgs","repos_url":"https://api.github.com/users/purdue-tlt/repos","events_url":"https://api.github.com/users/purdue-tlt/events{/privacy}","received_events_url":"https://api.github.com/users/purdue-tlt/received_events","type":"Organization","site_admin":false},"repo":{"id":126337742,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYzMzc3NDI=","name":"EFCache.Redis","full_name":"purdue-tlt/EFCache.Redis","owner":{"login":"purdue-tlt","id":26013184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDEzMTg0","avatar_url":"https://avatars1.githubusercontent.com/u/26013184?v=4","gravatar_id":"","url":"https://api.github.com/users/purdue-tlt","html_url":"https://github.com/purdue-tlt","followers_url":"https://api.github.com/users/purdue-tlt/followers","following_url":"https://api.github.com/users/purdue-tlt/following{/other_user}","gists_url":"https://api.github.com/users/purdue-tlt/gists{/gist_id}","starred_url":"https://api.github.com/users/purdue-tlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purdue-tlt/subscriptions","organizations_url":"https://api.github.com/users/purdue-tlt/orgs","repos_url":"https://api.github.com/users/purdue-tlt/repos","events_url":"https://api.github.com/users/purdue-tlt/events{/privacy}","received_events_url":"https://api.github.com/users/purdue-tlt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/purdue-tlt/EFCache.Redis","description":"Extends EFCache by adding Redis support","fork":true,"url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis","forks_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/forks","keys_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/teams","hooks_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/hooks","issue_events_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/events{/number}","events_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/events","assignees_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/assignees{/user}","branches_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/branches{/branch}","tags_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/tags","blobs_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/statuses/{sha}","languages_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/languages","stargazers_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/stargazers","contributors_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/contributors","subscribers_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/subscribers","subscription_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/subscription","commits_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/contents/{+path}","compare_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/merges","archive_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/downloads","issues_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues{/number}","pulls_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls{/number}","milestones_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/milestones{/number}","notifications_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/labels{/name}","releases_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/releases{/id}","deployments_url":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/deployments","created_at":"2018-03-22T13:15:59Z","updated_at":"2018-07-18T19:44:59Z","pushed_at":"2018-09-11T03:36:58Z","git_url":"git://github.com/purdue-tlt/EFCache.Redis.git","ssh_url":"git@github.com:purdue-tlt/EFCache.Redis.git","clone_url":"https://github.com/purdue-tlt/EFCache.Redis.git","svn_url":"https://github.com/purdue-tlt/EFCache.Redis","homepage":null,"size":1378,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4"},"html":{"href":"https://github.com/purdue-tlt/EFCache.Redis/pull/4"},"issue":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/4"},"comments":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/purdue-tlt/EFCache.Redis/statuses/a7df8c749a19f3f914542f38d061664d580f9b21"}},"author_association":"NONE"}}
{"actor":{"display_login":"builtbywill"}}