{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/195043890","pull_request_review_id":128329958,"id":195043890,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTA0Mzg5MA==","diff_hunk":"@@ -89,14 +93,16 @@ public function loadByEmail($email)\n         $this->logger->logCall(__METHOD__, array('email' => $email));\n         $users = $this->persistenceHandler->userHandler()->loadByEmail($email);\n \n-        $cacheItem->set($users);\n-        $cacheTags = [];\n-        foreach ($users as $user) {\n-            $cacheTags[] = 'content-' . $user->id;\n-            $cacheTags[] = 'user-' . $user->id;\n+        if (!empty($users)) {","path":"eZ/Publish/Core/Persistence/Cache/UserHandler.php","position":null,"original_position":20,"commit_id":"95af3c5d1c5aadbe3680048edf072518ca657990","original_commit_id":"d159bddc1fbd99b9b9fcc4a58d35d477a877e0bc","user":{"login":"kmadejski","id":10659510,"node_id":"MDQ6VXNlcjEwNjU5NTEw","avatar_url":"https://avatars2.githubusercontent.com/u/10659510?v=4","gravatar_id":"","url":"https://api.github.com/users/kmadejski","html_url":"https://github.com/kmadejski","followers_url":"https://api.github.com/users/kmadejski/followers","following_url":"https://api.github.com/users/kmadejski/following{/other_user}","gists_url":"https://api.github.com/users/kmadejski/gists{/gist_id}","starred_url":"https://api.github.com/users/kmadejski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmadejski/subscriptions","organizations_url":"https://api.github.com/users/kmadejski/orgs","repos_url":"https://api.github.com/users/kmadejski/repos","events_url":"https://api.github.com/users/kmadejski/events{/privacy}","received_events_url":"https://api.github.com/users/kmadejski/received_events","type":"User","site_admin":false},"body":"In second thought I've realized that in fact, it makes sense to cache these empty arrays. Therefore, I've removed this change. ","created_at":"2018-06-13T11:16:03Z","updated_at":"2018-06-13T11:16:03Z","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2347#discussion_r195043890","pull_request_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/195043890"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/2347#discussion_r195043890"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347"}},"in_reply_to_id":195038743},"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347","id":194527400,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NTI3NDAw","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2347","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2347.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2347.patch","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2347","number":2347,"state":"open","locked":false,"title":"EZP-29296: UserService loadByEmail returns empty array from cache","user":{"login":"kmadejski","id":10659510,"node_id":"MDQ6VXNlcjEwNjU5NTEw","avatar_url":"https://avatars2.githubusercontent.com/u/10659510?v=4","gravatar_id":"","url":"https://api.github.com/users/kmadejski","html_url":"https://github.com/kmadejski","followers_url":"https://api.github.com/users/kmadejski/followers","following_url":"https://api.github.com/users/kmadejski/following{/other_user}","gists_url":"https://api.github.com/users/kmadejski/gists{/gist_id}","starred_url":"https://api.github.com/users/kmadejski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmadejski/subscriptions","organizations_url":"https://api.github.com/users/kmadejski/orgs","repos_url":"https://api.github.com/users/kmadejski/repos","events_url":"https://api.github.com/users/kmadejski/events{/privacy}","received_events_url":"https://api.github.com/users/kmadejski/received_events","type":"User","site_admin":false},"body":"| Question           | Answer\r\n| ------------------ | ------------------\r\n| **JIRA issue**     | [EZP-29296](https://jira.ez.no/browse/EZP-29296)\r\n| **Bug**| yes\r\n| **New feature**    | no\r\n| **Target version** | `7.1` & `master`\r\n| **BC breaks**      | no\r\n| **Tests pass**     | yes/no\r\n| **Doc needed**     | no\r\n\r\nAs described in JIRA issue, `UserService::loadByEmail` returns an empty array when following steps described in the ticket scenario. \r\n\r\n\r\n**TODO**:\r\n- [x] Implement feature / fix a bug.\r\n- [x] Fix new code according to Coding Standards (`$ composer fix-cs`).\r\n- [x] Ask for Code Review.\r\n","created_at":"2018-06-13T09:43:13Z","updated_at":"2018-06-13T11:16:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23d841a1384303baa1910cecc6ebc175eca2a747","assignee":null,"assignees":[],"requested_reviewers":[{"login":"adamwojs","id":211967,"node_id":"MDQ6VXNlcjIxMTk2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/211967?v=4","gravatar_id":"","url":"https://api.github.com/users/adamwojs","html_url":"https://github.com/adamwojs","followers_url":"https://api.github.com/users/adamwojs/followers","following_url":"https://api.github.com/users/adamwojs/following{/other_user}","gists_url":"https://api.github.com/users/adamwojs/gists{/gist_id}","starred_url":"https://api.github.com/users/adamwojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamwojs/subscriptions","organizations_url":"https://api.github.com/users/adamwojs/orgs","repos_url":"https://api.github.com/users/adamwojs/repos","events_url":"https://api.github.com/users/adamwojs/events{/privacy}","received_events_url":"https://api.github.com/users/adamwojs/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347/commits","review_comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347/comments","review_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2347/comments","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/95af3c5d1c5aadbe3680048edf072518ca657990","head":{"label":"kmadejski:ezp_29296","ref":"ezp_29296","sha":"95af3c5d1c5aadbe3680048edf072518ca657990","user":{"login":"kmadejski","id":10659510,"node_id":"MDQ6VXNlcjEwNjU5NTEw","avatar_url":"https://avatars2.githubusercontent.com/u/10659510?v=4","gravatar_id":"","url":"https://api.github.com/users/kmadejski","html_url":"https://github.com/kmadejski","followers_url":"https://api.github.com/users/kmadejski/followers","following_url":"https://api.github.com/users/kmadejski/following{/other_user}","gists_url":"https://api.github.com/users/kmadejski/gists{/gist_id}","starred_url":"https://api.github.com/users/kmadejski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmadejski/subscriptions","organizations_url":"https://api.github.com/users/kmadejski/orgs","repos_url":"https://api.github.com/users/kmadejski/repos","events_url":"https://api.github.com/users/kmadejski/events{/privacy}","received_events_url":"https://api.github.com/users/kmadejski/received_events","type":"User","site_admin":false},"repo":{"id":92054642,"node_id":"MDEwOlJlcG9zaXRvcnk5MjA1NDY0Mg==","name":"ezpublish-kernel","full_name":"kmadejski/ezpublish-kernel","owner":{"login":"kmadejski","id":10659510,"node_id":"MDQ6VXNlcjEwNjU5NTEw","avatar_url":"https://avatars2.githubusercontent.com/u/10659510?v=4","gravatar_id":"","url":"https://api.github.com/users/kmadejski","html_url":"https://github.com/kmadejski","followers_url":"https://api.github.com/users/kmadejski/followers","following_url":"https://api.github.com/users/kmadejski/following{/other_user}","gists_url":"https://api.github.com/users/kmadejski/gists{/gist_id}","starred_url":"https://api.github.com/users/kmadejski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmadejski/subscriptions","organizations_url":"https://api.github.com/users/kmadejski/orgs","repos_url":"https://api.github.com/users/kmadejski/repos","events_url":"https://api.github.com/users/kmadejski/events{/privacy}","received_events_url":"https://api.github.com/users/kmadejski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kmadejski/ezpublish-kernel","description":"Kernel (Repository, MVC layer, REST) for eZ Platform","fork":true,"url":"https://api.github.com/repos/kmadejski/ezpublish-kernel","forks_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/kmadejski/ezpublish-kernel/deployments","created_at":"2017-05-22T13:06:46Z","updated_at":"2017-05-22T13:06:56Z","pushed_at":"2018-06-13T11:14:35Z","git_url":"git://github.com/kmadejski/ezpublish-kernel.git","ssh_url":"git@github.com:kmadejski/ezpublish-kernel.git","clone_url":"https://github.com/kmadejski/ezpublish-kernel.git","svn_url":"https://github.com/kmadejski/ezpublish-kernel","homepage":"http://ezplatform.com/","size":51073,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ezsystems:7.1","ref":"7.1","sha":"be796c6a175a829a0691d581d7a710ce79c01853","user":{"login":"ezsystems","id":295311,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NTMxMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/295311?v=4","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":1663890,"node_id":"MDEwOlJlcG9zaXRvcnkxNjYzODkw","name":"ezpublish-kernel","full_name":"ezsystems/ezpublish-kernel","owner":{"login":"ezsystems","id":295311,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NTMxMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/295311?v=4","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/ezpublish-kernel","description":"Kernel (Repository, MVC layer, REST) for eZ Platform","fork":false,"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel","forks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/deployments","created_at":"2011-04-26T08:54:24Z","updated_at":"2018-06-11T12:39:39Z","pushed_at":"2018-06-13T11:14:37Z","git_url":"git://github.com/ezsystems/ezpublish-kernel.git","ssh_url":"git@github.com:ezsystems/ezpublish-kernel.git","clone_url":"https://github.com/ezsystems/ezpublish-kernel.git","svn_url":"https://github.com/ezsystems/ezpublish-kernel","homepage":"http://ezplatform.com/","size":51319,"stargazers_count":144,"watchers_count":144,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":197,"mirror_url":null,"archived":false,"open_issues_count":84,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":197,"open_issues":84,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/2347"},"issue":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2347"},"comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2347/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2347/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/95af3c5d1c5aadbe3680048edf072518ca657990"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kmadejski"}}