{"action":"created","comment":{"url":"https://api.github.com/repos/Mashape/kong/pulls/comments/82718376","pull_request_review_id":3606027,"id":82718376,"diff_hunk":"@@ -68,8 +68,7 @@ local function authenticate(conf, given_credentials)\n   if given_username == nil then\n     return false\n   end\n-\n-  local credential = cache.get_or_set(cache.ldap_credential_key(given_username), function()\n+  local credential = cache.get_or_set(cache.ldap_credential_key(ngx.ctx.api.name, given_username), function()","path":"kong/plugins/ldap-auth/access.lua","position":6,"original_position":6,"commit_id":"b35259b37639411fe62624f1ed1ed8b9f1637e03","original_commit_id":"b35259b37639411fe62624f1ed1ed8b9f1637e03","user":{"login":"shashiranjan84","id":8146958,"avatar_url":"https://avatars.githubusercontent.com/u/8146958?v=3","gravatar_id":"","url":"https://api.github.com/users/shashiranjan84","html_url":"https://github.com/shashiranjan84","followers_url":"https://api.github.com/users/shashiranjan84/followers","following_url":"https://api.github.com/users/shashiranjan84/following{/other_user}","gists_url":"https://api.github.com/users/shashiranjan84/gists{/gist_id}","starred_url":"https://api.github.com/users/shashiranjan84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashiranjan84/subscriptions","organizations_url":"https://api.github.com/users/shashiranjan84/orgs","repos_url":"https://api.github.com/users/shashiranjan84/repos","events_url":"https://api.github.com/users/shashiranjan84/events{/privacy}","received_events_url":"https://api.github.com/users/shashiranjan84/received_events","type":"User","site_admin":false},"body":"Sure","created_at":"2016-10-11T03:09:51Z","updated_at":"2016-10-11T03:09:51Z","html_url":"https://github.com/Mashape/kong/pull/1733#discussion_r82718376","pull_request_url":"https://api.github.com/repos/Mashape/kong/pulls/1733","_links":{"self":{"href":"https://api.github.com/repos/Mashape/kong/pulls/comments/82718376"},"html":{"href":"https://github.com/Mashape/kong/pull/1733#discussion_r82718376"},"pull_request":{"href":"https://api.github.com/repos/Mashape/kong/pulls/1733"}}},"pull_request":{"url":"https://api.github.com/repos/Mashape/kong/pulls/1733","id":88740731,"html_url":"https://github.com/Mashape/kong/pull/1733","diff_url":"https://github.com/Mashape/kong/pull/1733.diff","patch_url":"https://github.com/Mashape/kong/pull/1733.patch","issue_url":"https://api.github.com/repos/Mashape/kong/issues/1733","number":1733,"state":"open","locked":false,"title":"fix (plugin/ldap) fixed cache_ttl","user":{"login":"shashiranjan84","id":8146958,"avatar_url":"https://avatars.githubusercontent.com/u/8146958?v=3","gravatar_id":"","url":"https://api.github.com/users/shashiranjan84","html_url":"https://github.com/shashiranjan84","followers_url":"https://api.github.com/users/shashiranjan84/followers","following_url":"https://api.github.com/users/shashiranjan84/following{/other_user}","gists_url":"https://api.github.com/users/shashiranjan84/gists{/gist_id}","starred_url":"https://api.github.com/users/shashiranjan84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashiranjan84/subscriptions","organizations_url":"https://api.github.com/users/shashiranjan84/orgs","repos_url":"https://api.github.com/users/shashiranjan84/repos","events_url":"https://api.github.com/users/shashiranjan84/events{/privacy}","received_events_url":"https://api.github.com/users/shashiranjan84/received_events","type":"User","site_admin":false},"body":"### Summary\r\n\r\nAdded TTL back to `database_cache.get_or_set` method for invalidating cached data timely \r\n\r\n### Full changelog\r\nUpdated  `database_cache.get_or_set` method to support expiration of cached data\r\nUpdated `database_cache.ldap_credential_key` method to make `username` unique across APIs\r\nAdded test for cache invalidation   \r\n\r\n### Issues resolved\r\n\r\nFix #1695\r\n\r\n","created_at":"2016-10-10T22:18:39Z","updated_at":"2016-10-11T03:09:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0358b4adc456208d6d804d2e3a593477dcd30bdf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Mashape/kong/pulls/1733/commits","review_comments_url":"https://api.github.com/repos/Mashape/kong/pulls/1733/comments","review_comment_url":"https://api.github.com/repos/Mashape/kong/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/1733/comments","statuses_url":"https://api.github.com/repos/Mashape/kong/statuses/b35259b37639411fe62624f1ed1ed8b9f1637e03","head":{"label":"Mashape:fix/ldap-ttl","ref":"fix/ldap-ttl","sha":"b35259b37639411fe62624f1ed1ed8b9f1637e03","user":{"login":"Mashape","id":962416,"avatar_url":"https://avatars.githubusercontent.com/u/962416?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashape","html_url":"https://github.com/Mashape","followers_url":"https://api.github.com/users/Mashape/followers","following_url":"https://api.github.com/users/Mashape/following{/other_user}","gists_url":"https://api.github.com/users/Mashape/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashape/subscriptions","organizations_url":"https://api.github.com/users/Mashape/orgs","repos_url":"https://api.github.com/users/Mashape/repos","events_url":"https://api.github.com/users/Mashape/events{/privacy}","received_events_url":"https://api.github.com/users/Mashape/received_events","type":"Organization","site_admin":false},"repo":{"id":26783295,"name":"kong","full_name":"Mashape/kong","owner":{"login":"Mashape","id":962416,"avatar_url":"https://avatars.githubusercontent.com/u/962416?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashape","html_url":"https://github.com/Mashape","followers_url":"https://api.github.com/users/Mashape/followers","following_url":"https://api.github.com/users/Mashape/following{/other_user}","gists_url":"https://api.github.com/users/Mashape/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashape/subscriptions","organizations_url":"https://api.github.com/users/Mashape/orgs","repos_url":"https://api.github.com/users/Mashape/repos","events_url":"https://api.github.com/users/Mashape/events{/privacy}","received_events_url":"https://api.github.com/users/Mashape/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Mashape/kong","description":":monkey: The Open-Source API Gateway and Microservice Management Layer, built on NGINX","fork":false,"url":"https://api.github.com/repos/Mashape/kong","forks_url":"https://api.github.com/repos/Mashape/kong/forks","keys_url":"https://api.github.com/repos/Mashape/kong/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mashape/kong/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mashape/kong/teams","hooks_url":"https://api.github.com/repos/Mashape/kong/hooks","issue_events_url":"https://api.github.com/repos/Mashape/kong/issues/events{/number}","events_url":"https://api.github.com/repos/Mashape/kong/events","assignees_url":"https://api.github.com/repos/Mashape/kong/assignees{/user}","branches_url":"https://api.github.com/repos/Mashape/kong/branches{/branch}","tags_url":"https://api.github.com/repos/Mashape/kong/tags","blobs_url":"https://api.github.com/repos/Mashape/kong/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mashape/kong/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mashape/kong/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mashape/kong/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mashape/kong/statuses/{sha}","languages_url":"https://api.github.com/repos/Mashape/kong/languages","stargazers_url":"https://api.github.com/repos/Mashape/kong/stargazers","contributors_url":"https://api.github.com/repos/Mashape/kong/contributors","subscribers_url":"https://api.github.com/repos/Mashape/kong/subscribers","subscription_url":"https://api.github.com/repos/Mashape/kong/subscription","commits_url":"https://api.github.com/repos/Mashape/kong/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mashape/kong/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mashape/kong/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mashape/kong/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mashape/kong/contents/{+path}","compare_url":"https://api.github.com/repos/Mashape/kong/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mashape/kong/merges","archive_url":"https://api.github.com/repos/Mashape/kong/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mashape/kong/downloads","issues_url":"https://api.github.com/repos/Mashape/kong/issues{/number}","pulls_url":"https://api.github.com/repos/Mashape/kong/pulls{/number}","milestones_url":"https://api.github.com/repos/Mashape/kong/milestones{/number}","notifications_url":"https://api.github.com/repos/Mashape/kong/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mashape/kong/labels{/name}","releases_url":"https://api.github.com/repos/Mashape/kong/releases{/id}","deployments_url":"https://api.github.com/repos/Mashape/kong/deployments","created_at":"2014-11-17T23:56:08Z","updated_at":"2016-10-10T20:22:10Z","pushed_at":"2016-10-11T02:42:35Z","git_url":"git://github.com/Mashape/kong.git","ssh_url":"git@github.com:Mashape/kong.git","clone_url":"https://github.com/Mashape/kong.git","svn_url":"https://github.com/Mashape/kong","homepage":"https://getkong.org/","size":110590,"stargazers_count":7031,"watchers_count":7031,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":671,"mirror_url":null,"open_issues_count":273,"forks":671,"open_issues":273,"watchers":7031,"default_branch":"master"}},"base":{"label":"Mashape:master","ref":"master","sha":"a0198c18395fd03aa3ce9ca7f462adc1c2467612","user":{"login":"Mashape","id":962416,"avatar_url":"https://avatars.githubusercontent.com/u/962416?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashape","html_url":"https://github.com/Mashape","followers_url":"https://api.github.com/users/Mashape/followers","following_url":"https://api.github.com/users/Mashape/following{/other_user}","gists_url":"https://api.github.com/users/Mashape/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashape/subscriptions","organizations_url":"https://api.github.com/users/Mashape/orgs","repos_url":"https://api.github.com/users/Mashape/repos","events_url":"https://api.github.com/users/Mashape/events{/privacy}","received_events_url":"https://api.github.com/users/Mashape/received_events","type":"Organization","site_admin":false},"repo":{"id":26783295,"name":"kong","full_name":"Mashape/kong","owner":{"login":"Mashape","id":962416,"avatar_url":"https://avatars.githubusercontent.com/u/962416?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashape","html_url":"https://github.com/Mashape","followers_url":"https://api.github.com/users/Mashape/followers","following_url":"https://api.github.com/users/Mashape/following{/other_user}","gists_url":"https://api.github.com/users/Mashape/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashape/subscriptions","organizations_url":"https://api.github.com/users/Mashape/orgs","repos_url":"https://api.github.com/users/Mashape/repos","events_url":"https://api.github.com/users/Mashape/events{/privacy}","received_events_url":"https://api.github.com/users/Mashape/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Mashape/kong","description":":monkey: The Open-Source API Gateway and Microservice Management Layer, built on NGINX","fork":false,"url":"https://api.github.com/repos/Mashape/kong","forks_url":"https://api.github.com/repos/Mashape/kong/forks","keys_url":"https://api.github.com/repos/Mashape/kong/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mashape/kong/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mashape/kong/teams","hooks_url":"https://api.github.com/repos/Mashape/kong/hooks","issue_events_url":"https://api.github.com/repos/Mashape/kong/issues/events{/number}","events_url":"https://api.github.com/repos/Mashape/kong/events","assignees_url":"https://api.github.com/repos/Mashape/kong/assignees{/user}","branches_url":"https://api.github.com/repos/Mashape/kong/branches{/branch}","tags_url":"https://api.github.com/repos/Mashape/kong/tags","blobs_url":"https://api.github.com/repos/Mashape/kong/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mashape/kong/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mashape/kong/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mashape/kong/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mashape/kong/statuses/{sha}","languages_url":"https://api.github.com/repos/Mashape/kong/languages","stargazers_url":"https://api.github.com/repos/Mashape/kong/stargazers","contributors_url":"https://api.github.com/repos/Mashape/kong/contributors","subscribers_url":"https://api.github.com/repos/Mashape/kong/subscribers","subscription_url":"https://api.github.com/repos/Mashape/kong/subscription","commits_url":"https://api.github.com/repos/Mashape/kong/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mashape/kong/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mashape/kong/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mashape/kong/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mashape/kong/contents/{+path}","compare_url":"https://api.github.com/repos/Mashape/kong/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mashape/kong/merges","archive_url":"https://api.github.com/repos/Mashape/kong/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mashape/kong/downloads","issues_url":"https://api.github.com/repos/Mashape/kong/issues{/number}","pulls_url":"https://api.github.com/repos/Mashape/kong/pulls{/number}","milestones_url":"https://api.github.com/repos/Mashape/kong/milestones{/number}","notifications_url":"https://api.github.com/repos/Mashape/kong/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mashape/kong/labels{/name}","releases_url":"https://api.github.com/repos/Mashape/kong/releases{/id}","deployments_url":"https://api.github.com/repos/Mashape/kong/deployments","created_at":"2014-11-17T23:56:08Z","updated_at":"2016-10-10T20:22:10Z","pushed_at":"2016-10-11T02:42:35Z","git_url":"git://github.com/Mashape/kong.git","ssh_url":"git@github.com:Mashape/kong.git","clone_url":"https://github.com/Mashape/kong.git","svn_url":"https://github.com/Mashape/kong","homepage":"https://getkong.org/","size":110590,"stargazers_count":7031,"watchers_count":7031,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":671,"mirror_url":null,"open_issues_count":273,"forks":671,"open_issues":273,"watchers":7031,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mashape/kong/pulls/1733"},"html":{"href":"https://github.com/Mashape/kong/pull/1733"},"issue":{"href":"https://api.github.com/repos/Mashape/kong/issues/1733"},"comments":{"href":"https://api.github.com/repos/Mashape/kong/issues/1733/comments"},"review_comments":{"href":"https://api.github.com/repos/Mashape/kong/pulls/1733/comments"},"review_comment":{"href":"https://api.github.com/repos/Mashape/kong/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mashape/kong/pulls/1733/commits"},"statuses":{"href":"https://api.github.com/repos/Mashape/kong/statuses/b35259b37639411fe62624f1ed1ed8b9f1637e03"}}}}
{"actor":{"display_login":"shashiranjan84"}}