{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/comments/79415379","id":79415379,"diff_hunk":"@@ -1,8 +1,31 @@\n from redis.sentinel import Sentinel\n from redis import StrictRedis\n import json\n+import plpy\n \n \n+class RedisConnectionFactory:\n+\n+    @classmethod\n+    def get_metadata_connection(cls, username):\n+        cache_key = \"redis_connection_{0}_metadata\".format(username)\n+        if cache_key in plpy.GD:","path":"server/lib/python/cartodb_services/cartodb_services/tools/redis_tools.py","position":12,"original_position":12,"commit_id":"9fc1175539cdf9a70d51c566ea6e759200009731","original_commit_id":"20a87bcc6e0dc1945a364b668981f0f0b1ab8154","user":{"login":"rafatower","id":1914276,"avatar_url":"https://avatars.githubusercontent.com/u/1914276?v=3","gravatar_id":"","url":"https://api.github.com/users/rafatower","html_url":"https://github.com/rafatower","followers_url":"https://api.github.com/users/rafatower/followers","following_url":"https://api.github.com/users/rafatower/following{/other_user}","gists_url":"https://api.github.com/users/rafatower/gists{/gist_id}","starred_url":"https://api.github.com/users/rafatower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafatower/subscriptions","organizations_url":"https://api.github.com/users/rafatower/orgs","repos_url":"https://api.github.com/users/rafatower/repos","events_url":"https://api.github.com/users/rafatower/events{/privacy}","received_events_url":"https://api.github.com/users/rafatower/received_events","type":"User","site_admin":false},"body":"Point taken. That said I will not mind about (early) optimizations until they prove to be a problem. Anyway caching is an implementation detail that will be isolated rather than scattered in `GD` usage","created_at":"2016-09-19T15:18:40Z","updated_at":"2016-09-19T15:18:48Z","html_url":"https://github.com/CartoDB/dataservices-api/pull/274#discussion_r79415379","pull_request_url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/comments/79415379"},"html":{"href":"https://github.com/CartoDB/dataservices-api/pull/274#discussion_r79415379"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274","id":85429255,"html_url":"https://github.com/CartoDB/dataservices-api/pull/274","diff_url":"https://github.com/CartoDB/dataservices-api/pull/274.diff","patch_url":"https://github.com/CartoDB/dataservices-api/pull/274.patch","issue_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues/274","number":274,"state":"open","locked":false,"title":"Redis refactor","user":{"login":"iriberri","id":1730320,"avatar_url":"https://avatars.githubusercontent.com/u/1730320?v=3","gravatar_id":"","url":"https://api.github.com/users/iriberri","html_url":"https://github.com/iriberri","followers_url":"https://api.github.com/users/iriberri/followers","following_url":"https://api.github.com/users/iriberri/following{/other_user}","gists_url":"https://api.github.com/users/iriberri/gists{/gist_id}","starred_url":"https://api.github.com/users/iriberri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iriberri/subscriptions","organizations_url":"https://api.github.com/users/iriberri/orgs","repos_url":"https://api.github.com/users/iriberri/repos","events_url":"https://api.github.com/users/iriberri/events{/privacy}","received_events_url":"https://api.github.com/users/iriberri/received_events","type":"User","site_admin":false},"body":"#273 ","created_at":"2016-09-15T15:44:39Z","updated_at":"2016-09-19T15:18:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e57a49d15ebc4e98f57de153346c024fb81cb67","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274/commits","review_comments_url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274/comments","review_comment_url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues/274/comments","statuses_url":"https://api.github.com/repos/CartoDB/dataservices-api/statuses/9fc1175539cdf9a70d51c566ea6e759200009731","head":{"label":"CartoDB:redis-refactor","ref":"redis-refactor","sha":"9fc1175539cdf9a70d51c566ea6e759200009731","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":45457790,"name":"dataservices-api","full_name":"CartoDB/dataservices-api","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/dataservices-api","description":"The CARTO Data Services API","fork":false,"url":"https://api.github.com/repos/CartoDB/dataservices-api","forks_url":"https://api.github.com/repos/CartoDB/dataservices-api/forks","keys_url":"https://api.github.com/repos/CartoDB/dataservices-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/dataservices-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/dataservices-api/teams","hooks_url":"https://api.github.com/repos/CartoDB/dataservices-api/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/dataservices-api/events","assignees_url":"https://api.github.com/repos/CartoDB/dataservices-api/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/dataservices-api/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/dataservices-api/tags","blobs_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/dataservices-api/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/dataservices-api/languages","stargazers_url":"https://api.github.com/repos/CartoDB/dataservices-api/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/dataservices-api/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/dataservices-api/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/dataservices-api/subscription","commits_url":"https://api.github.com/repos/CartoDB/dataservices-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/dataservices-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/dataservices-api/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/dataservices-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/dataservices-api/merges","archive_url":"https://api.github.com/repos/CartoDB/dataservices-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/dataservices-api/downloads","issues_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/dataservices-api/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/dataservices-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/dataservices-api/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/dataservices-api/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/dataservices-api/deployments","created_at":"2015-11-03T10:05:38Z","updated_at":"2016-09-12T07:48:28Z","pushed_at":"2016-09-19T15:17:26Z","git_url":"git://github.com/CartoDB/dataservices-api.git","ssh_url":"git@github.com:CartoDB/dataservices-api.git","clone_url":"https://github.com/CartoDB/dataservices-api.git","svn_url":"https://github.com/CartoDB/dataservices-api","homepage":"https://carto.com/docs/carto-engine/dataservices-api/","size":1013,"stargazers_count":5,"watchers_count":5,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":5,"default_branch":"development"}},"base":{"label":"CartoDB:development","ref":"development","sha":"9f55f2ee3bc50e8c9467f9f4af3d56bf0a04efae","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":45457790,"name":"dataservices-api","full_name":"CartoDB/dataservices-api","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/dataservices-api","description":"The CARTO Data Services API","fork":false,"url":"https://api.github.com/repos/CartoDB/dataservices-api","forks_url":"https://api.github.com/repos/CartoDB/dataservices-api/forks","keys_url":"https://api.github.com/repos/CartoDB/dataservices-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/dataservices-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/dataservices-api/teams","hooks_url":"https://api.github.com/repos/CartoDB/dataservices-api/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/dataservices-api/events","assignees_url":"https://api.github.com/repos/CartoDB/dataservices-api/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/dataservices-api/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/dataservices-api/tags","blobs_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/dataservices-api/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/dataservices-api/languages","stargazers_url":"https://api.github.com/repos/CartoDB/dataservices-api/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/dataservices-api/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/dataservices-api/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/dataservices-api/subscription","commits_url":"https://api.github.com/repos/CartoDB/dataservices-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/dataservices-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/dataservices-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/dataservices-api/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/dataservices-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/dataservices-api/merges","archive_url":"https://api.github.com/repos/CartoDB/dataservices-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/dataservices-api/downloads","issues_url":"https://api.github.com/repos/CartoDB/dataservices-api/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/dataservices-api/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/dataservices-api/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/dataservices-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/dataservices-api/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/dataservices-api/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/dataservices-api/deployments","created_at":"2015-11-03T10:05:38Z","updated_at":"2016-09-12T07:48:28Z","pushed_at":"2016-09-19T15:17:26Z","git_url":"git://github.com/CartoDB/dataservices-api.git","ssh_url":"git@github.com:CartoDB/dataservices-api.git","clone_url":"https://github.com/CartoDB/dataservices-api.git","svn_url":"https://github.com/CartoDB/dataservices-api","homepage":"https://carto.com/docs/carto-engine/dataservices-api/","size":1013,"stargazers_count":5,"watchers_count":5,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":5,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274"},"html":{"href":"https://github.com/CartoDB/dataservices-api/pull/274"},"issue":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/issues/274"},"comments":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/issues/274/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/pulls/274/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/dataservices-api/statuses/9fc1175539cdf9a70d51c566ea6e759200009731"}}}}
{"actor":{"display_login":"rafatower"}}