{"action":"created","comment":{"url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/comments/218454920","pull_request_review_id":156392747,"id":218454920,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODQ1NDkyMA==","diff_hunk":"@@ -1116,55 +1118,92 @@ sub display_list_of_tags($$) {\n \t\t\t];\n \t}\t\n \t\n-\teval {\n-\t\t$log->debug(\"Executing MongoDB aggregate query\", { query => $aggregate_parameters }) if $log->is_debug();\n-\t\t$results = $products_collection->aggregate( $aggregate_parameters );\n-\t};\n-\tif ($@) {\n-\t\t$log->warn(\"MongoDB error - retrying once\", { error => $@ }) if $log->is_warn();\n-\t\t# maybe $connection auto-reconnects but $database and $products_collection still reference the old connection?\n-\t\t\n-\t\t# opening new connection\n+\tmy $mongodb_query_ref = $aggregate_parameters;\n+\t\n+\tmy $key = $server_domain . \"/\" . freeze($mongodb_query_ref);\n+\t\n+\t$log->debug(\"MongoDB aggregate query key\", { \"key\" => $key}) if $log->is_debug();\n+\n+\tuse Digest::MD5 qw(md5_hex);\n+\t$key = md5_hex($key);\n+\t\n+\t$log->debug(\"MongoDB crypted aggregate query key\", { \"key\" => $key}) if $log->is_debug();","path":"lib/ProductOpener/Display.pm","position":38,"original_position":38,"commit_id":"0f6b9b3a3e433bcb8a6549f55a51fe27fd74a0b0","original_commit_id":"0f6b9b3a3e433bcb8a6549f55a51fe27fd74a0b0","user":{"login":"hangy","id":87124,"node_id":"MDQ6VXNlcjg3MTI0","avatar_url":"https://avatars0.githubusercontent.com/u/87124?v=4","gravatar_id":"","url":"https://api.github.com/users/hangy","html_url":"https://github.com/hangy","followers_url":"https://api.github.com/users/hangy/followers","following_url":"https://api.github.com/users/hangy/following{/other_user}","gists_url":"https://api.github.com/users/hangy/gists{/gist_id}","starred_url":"https://api.github.com/users/hangy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hangy/subscriptions","organizations_url":"https://api.github.com/users/hangy/orgs","repos_url":"https://api.github.com/users/hangy/repos","events_url":"https://api.github.com/users/hangy/events{/privacy}","received_events_url":"https://api.github.com/users/hangy/received_events","type":"User","site_admin":false},"body":"MD5 is not encrypted. 😉","created_at":"2018-09-18T14:25:57Z","updated_at":"2018-09-18T14:39:19Z","html_url":"https://github.com/openfoodfacts/openfoodfacts-server/pull/1332#discussion_r218454920","pull_request_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/comments/218454920"},"html":{"href":"https://github.com/openfoodfacts/openfoodfacts-server/pull/1332#discussion_r218454920"},"pull_request":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332"}}},"pull_request":{"url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332","id":216025798,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MDI1Nzk4","html_url":"https://github.com/openfoodfacts/openfoodfacts-server/pull/1332","diff_url":"https://github.com/openfoodfacts/openfoodfacts-server/pull/1332.diff","patch_url":"https://github.com/openfoodfacts/openfoodfacts-server/pull/1332.patch","issue_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/1332","number":1332,"state":"open","locked":false,"title":"Issue 1331/memcached","user":{"login":"stephanegigandet","id":8158668,"node_id":"MDQ6VXNlcjgxNTg2Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/8158668?v=4","gravatar_id":"","url":"https://api.github.com/users/stephanegigandet","html_url":"https://github.com/stephanegigandet","followers_url":"https://api.github.com/users/stephanegigandet/followers","following_url":"https://api.github.com/users/stephanegigandet/following{/other_user}","gists_url":"https://api.github.com/users/stephanegigandet/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanegigandet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanegigandet/subscriptions","organizations_url":"https://api.github.com/users/stephanegigandet/orgs","repos_url":"https://api.github.com/users/stephanegigandet/repos","events_url":"https://api.github.com/users/stephanegigandet/events{/privacy}","received_events_url":"https://api.github.com/users/stephanegigandet/received_events","type":"User","site_admin":false},"body":"Added caching of mongodb query results.","created_at":"2018-09-17T15:37:12Z","updated_at":"2018-09-18T14:39:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"568440d395e5e507c6f93c7f441349a24282638a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332/commits","review_comments_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332/comments","review_comment_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/1332/comments","statuses_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/statuses/0f6b9b3a3e433bcb8a6549f55a51fe27fd74a0b0","head":{"label":"openfoodfacts:issue-1331/memcached","ref":"issue-1331/memcached","sha":"0f6b9b3a3e433bcb8a6549f55a51fe27fd74a0b0","user":{"login":"openfoodfacts","id":1937790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5Mzc3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1937790?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfacts","html_url":"https://github.com/openfoodfacts","followers_url":"https://api.github.com/users/openfoodfacts/followers","following_url":"https://api.github.com/users/openfoodfacts/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfacts/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfacts/subscriptions","organizations_url":"https://api.github.com/users/openfoodfacts/orgs","repos_url":"https://api.github.com/users/openfoodfacts/repos","events_url":"https://api.github.com/users/openfoodfacts/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfacts/received_events","type":"Organization","site_admin":false},"repo":{"id":14111770,"node_id":"MDEwOlJlcG9zaXRvcnkxNDExMTc3MA==","name":"openfoodfacts-server","full_name":"openfoodfacts/openfoodfacts-server","private":false,"owner":{"login":"openfoodfacts","id":1937790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5Mzc3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1937790?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfacts","html_url":"https://github.com/openfoodfacts","followers_url":"https://api.github.com/users/openfoodfacts/followers","following_url":"https://api.github.com/users/openfoodfacts/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfacts/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfacts/subscriptions","organizations_url":"https://api.github.com/users/openfoodfacts/orgs","repos_url":"https://api.github.com/users/openfoodfacts/repos","events_url":"https://api.github.com/users/openfoodfacts/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfacts/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openfoodfacts/openfoodfacts-server","description":"Open Food Facts database and web interface - 🐪🦋 Perl and HTML/CSS coders welcome 😊","fork":false,"url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server","forks_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/forks","keys_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/teams","hooks_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/hooks","issue_events_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/events{/number}","events_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/events","assignees_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/assignees{/user}","branches_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/branches{/branch}","tags_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/tags","blobs_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/statuses/{sha}","languages_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/languages","stargazers_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/stargazers","contributors_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/contributors","subscribers_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/subscribers","subscription_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/subscription","commits_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/contents/{+path}","compare_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/merges","archive_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/downloads","issues_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues{/number}","pulls_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls{/number}","milestones_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/milestones{/number}","notifications_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/labels{/name}","releases_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/releases{/id}","deployments_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/deployments","created_at":"2013-11-04T14:23:24Z","updated_at":"2018-09-18T14:24:25Z","pushed_at":"2018-09-18T14:24:23Z","git_url":"git://github.com/openfoodfacts/openfoodfacts-server.git","ssh_url":"git@github.com:openfoodfacts/openfoodfacts-server.git","clone_url":"https://github.com/openfoodfacts/openfoodfacts-server.git","svn_url":"https://github.com/openfoodfacts/openfoodfacts-server","homepage":"","size":336690,"stargazers_count":98,"watchers_count":98,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":738,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":33,"open_issues":738,"watchers":98,"default_branch":"master"}},"base":{"label":"openfoodfacts:master","ref":"master","sha":"4ab7b4e45df5174dfb70c8dc3bfc98a7ebc0ddf8","user":{"login":"openfoodfacts","id":1937790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5Mzc3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1937790?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfacts","html_url":"https://github.com/openfoodfacts","followers_url":"https://api.github.com/users/openfoodfacts/followers","following_url":"https://api.github.com/users/openfoodfacts/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfacts/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfacts/subscriptions","organizations_url":"https://api.github.com/users/openfoodfacts/orgs","repos_url":"https://api.github.com/users/openfoodfacts/repos","events_url":"https://api.github.com/users/openfoodfacts/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfacts/received_events","type":"Organization","site_admin":false},"repo":{"id":14111770,"node_id":"MDEwOlJlcG9zaXRvcnkxNDExMTc3MA==","name":"openfoodfacts-server","full_name":"openfoodfacts/openfoodfacts-server","private":false,"owner":{"login":"openfoodfacts","id":1937790,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5Mzc3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1937790?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfacts","html_url":"https://github.com/openfoodfacts","followers_url":"https://api.github.com/users/openfoodfacts/followers","following_url":"https://api.github.com/users/openfoodfacts/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfacts/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfacts/subscriptions","organizations_url":"https://api.github.com/users/openfoodfacts/orgs","repos_url":"https://api.github.com/users/openfoodfacts/repos","events_url":"https://api.github.com/users/openfoodfacts/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfacts/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openfoodfacts/openfoodfacts-server","description":"Open Food Facts database and web interface - 🐪🦋 Perl and HTML/CSS coders welcome 😊","fork":false,"url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server","forks_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/forks","keys_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/teams","hooks_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/hooks","issue_events_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/events{/number}","events_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/events","assignees_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/assignees{/user}","branches_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/branches{/branch}","tags_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/tags","blobs_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/statuses/{sha}","languages_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/languages","stargazers_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/stargazers","contributors_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/contributors","subscribers_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/subscribers","subscription_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/subscription","commits_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/contents/{+path}","compare_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/merges","archive_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/downloads","issues_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues{/number}","pulls_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls{/number}","milestones_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/milestones{/number}","notifications_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/labels{/name}","releases_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/releases{/id}","deployments_url":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/deployments","created_at":"2013-11-04T14:23:24Z","updated_at":"2018-09-18T14:24:25Z","pushed_at":"2018-09-18T14:24:23Z","git_url":"git://github.com/openfoodfacts/openfoodfacts-server.git","ssh_url":"git@github.com:openfoodfacts/openfoodfacts-server.git","clone_url":"https://github.com/openfoodfacts/openfoodfacts-server.git","svn_url":"https://github.com/openfoodfacts/openfoodfacts-server","homepage":"","size":336690,"stargazers_count":98,"watchers_count":98,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":738,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":33,"open_issues":738,"watchers":98,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332"},"html":{"href":"https://github.com/openfoodfacts/openfoodfacts-server/pull/1332"},"issue":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/1332"},"comments":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/issues/1332/comments"},"review_comments":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332/comments"},"review_comment":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/pulls/1332/commits"},"statuses":{"href":"https://api.github.com/repos/openfoodfacts/openfoodfacts-server/statuses/0f6b9b3a3e433bcb8a6549f55a51fe27fd74a0b0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hangy"}}