{"action":"created","comment":{"url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/comments/23924124","id":23924124,"diff_hunk":"@@ -0,0 +1,116 @@\n+/*\n+ * Copyright 2014 the original author or authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.springframework.data.redis.cache;\n+\n+import static org.springframework.util.Assert.*;\n+\n+import java.util.Arrays;\n+\n+import org.springframework.data.redis.serializer.RedisSerializer;\n+\n+/**\n+ * @author Christoph Strobl\n+ * @since 1.5\n+ */\n+public class RedisCacheKey {\n+\n+\tprivate final Object keyElement;\n+\tprivate byte[] prefix;\n+\t@SuppressWarnings(\"rawtypes\")//\n+\tprivate RedisSerializer serializer;","path":"src/main/java/org/springframework/data/redis/cache/RedisCacheKey.java","position":33,"original_position":33,"commit_id":"74e9045ebd16b25dc5d84d5c2e37d3ef63070139","original_commit_id":"74e9045ebd16b25dc5d84d5c2e37d3ef63070139","user":{"login":"christophstrobl","id":2317257,"avatar_url":"https://avatars.githubusercontent.com/u/2317257?v=3","gravatar_id":"","url":"https://api.github.com/users/christophstrobl","html_url":"https://github.com/christophstrobl","followers_url":"https://api.github.com/users/christophstrobl/followers","following_url":"https://api.github.com/users/christophstrobl/following{/other_user}","gists_url":"https://api.github.com/users/christophstrobl/gists{/gist_id}","starred_url":"https://api.github.com/users/christophstrobl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophstrobl/subscriptions","organizations_url":"https://api.github.com/users/christophstrobl/orgs","repos_url":"https://api.github.com/users/christophstrobl/repos","events_url":"https://api.github.com/users/christophstrobl/events{/privacy}","received_events_url":"https://api.github.com/users/christophstrobl/received_events","type":"User","site_admin":false},"body":"Favor usage of an `Accessor` over directly using the the `RedisSerializer`.","created_at":"2015-02-02T13:32:34Z","updated_at":"2015-02-02T13:32:34Z","html_url":"https://github.com/spring-projects/spring-data-redis/pull/122#discussion_r23924124","pull_request_url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122","_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/comments/23924124"},"html":{"href":"https://github.com/spring-projects/spring-data-redis/pull/122#discussion_r23924124"},"pull_request":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122"}}},"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122","id":28198528,"html_url":"https://github.com/spring-projects/spring-data-redis/pull/122","diff_url":"https://github.com/spring-projects/spring-data-redis/pull/122.diff","patch_url":"https://github.com/spring-projects/spring-data-redis/pull/122.patch","issue_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/122","number":122,"state":"open","locked":false,"title":"DATAREDIS-369 - Avoid resource leak in RedisCache.","user":{"login":"thomasdarimont","id":314690,"avatar_url":"https://avatars.githubusercontent.com/u/314690?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasdarimont","html_url":"https://github.com/thomasdarimont","followers_url":"https://api.github.com/users/thomasdarimont/followers","following_url":"https://api.github.com/users/thomasdarimont/following{/other_user}","gists_url":"https://api.github.com/users/thomasdarimont/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasdarimont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasdarimont/subscriptions","organizations_url":"https://api.github.com/users/thomasdarimont/orgs","repos_url":"https://api.github.com/users/thomasdarimont/repos","events_url":"https://api.github.com/users/thomasdarimont/events{/privacy}","received_events_url":"https://api.github.com/users/thomasdarimont/received_events","type":"User","site_admin":false},"body":"In order to make sure that time-outed keys are removed from the set of known cache keys, we probe each key in the known cache keys set (setName) for existence during put / putIfAbsent operations and remove the keys from he known cache key set if redis doesn’t contain the key anymore.","created_at":"2015-01-28T14:46:56Z","updated_at":"2015-02-02T13:32:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c65fbff313e08b33eee87297c0ff59b75c303a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122/commits","review_comments_url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122/comments","review_comment_url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/122/comments","statuses_url":"https://api.github.com/repos/spring-projects/spring-data-redis/statuses/74e9045ebd16b25dc5d84d5c2e37d3ef63070139","head":{"label":"spring-projects:issue/DATAREDIS-369","ref":"issue/DATAREDIS-369","sha":"74e9045ebd16b25dc5d84d5c2e37d3ef63070139","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":1983092,"name":"spring-data-redis","full_name":"spring-projects/spring-data-redis","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-data-redis","description":"Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-data-redis","forks_url":"https://api.github.com/repos/spring-projects/spring-data-redis/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-data-redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-data-redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-data-redis/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-data-redis/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-data-redis/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-data-redis/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-data-redis/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-data-redis/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-data-redis/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-data-redis/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-data-redis/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-data-redis/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-data-redis/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-data-redis/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-data-redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/comments/{number}","contents_url":"https://api.github.com/repos/spring-projects/spring-data-redis/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-data-redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-data-redis/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-data-redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-data-redis/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-data-redis/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-data-redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-data-redis/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-data-redis/releases{/id}","created_at":"2011-07-01T11:57:33Z","updated_at":"2015-01-28T19:55:10Z","pushed_at":"2015-02-02T12:56:59Z","git_url":"git://github.com/spring-projects/spring-data-redis.git","ssh_url":"git@github.com:spring-projects/spring-data-redis.git","clone_url":"https://github.com/spring-projects/spring-data-redis.git","svn_url":"https://github.com/spring-projects/spring-data-redis","homepage":"http://projects.spring.io/spring-data/","size":13163,"stargazers_count":163,"watchers_count":163,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":130,"mirror_url":null,"open_issues_count":12,"forks":130,"open_issues":12,"watchers":163,"default_branch":"master"}},"base":{"label":"spring-projects:master","ref":"master","sha":"d1aaa90a2a87aa99f8e6babd19639d616e6c1c4e","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":1983092,"name":"spring-data-redis","full_name":"spring-projects/spring-data-redis","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-data-redis","description":"Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-data-redis","forks_url":"https://api.github.com/repos/spring-projects/spring-data-redis/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-data-redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-data-redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-data-redis/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-data-redis/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-data-redis/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-data-redis/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-data-redis/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-data-redis/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-data-redis/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-data-redis/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-data-redis/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-data-redis/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-data-redis/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-data-redis/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-data-redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-data-redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/comments/{number}","contents_url":"https://api.github.com/repos/spring-projects/spring-data-redis/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-data-redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-data-redis/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-data-redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-data-redis/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-data-redis/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-data-redis/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-data-redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-data-redis/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-data-redis/releases{/id}","created_at":"2011-07-01T11:57:33Z","updated_at":"2015-01-28T19:55:10Z","pushed_at":"2015-02-02T12:56:59Z","git_url":"git://github.com/spring-projects/spring-data-redis.git","ssh_url":"git@github.com:spring-projects/spring-data-redis.git","clone_url":"https://github.com/spring-projects/spring-data-redis.git","svn_url":"https://github.com/spring-projects/spring-data-redis","homepage":"http://projects.spring.io/spring-data/","size":13163,"stargazers_count":163,"watchers_count":163,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":130,"mirror_url":null,"open_issues_count":12,"forks":130,"open_issues":12,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122"},"html":{"href":"https://github.com/spring-projects/spring-data-redis/pull/122"},"issue":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/122"},"comments":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/issues/122/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/pulls/122/commits"},"statuses":{"href":"https://api.github.com/repos/spring-projects/spring-data-redis/statuses/74e9045ebd16b25dc5d84d5c2e37d3ef63070139"}}}}