{"action":"created","comment":{"url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/comments/23651361","id":23651361,"diff_hunk":"@@ -0,0 +1,36 @@\n+//\n+//  BNCLinkCache.m\n+//  Branch-SDK\n+//\n+//  Created by Qinwei Gong on 1/23/15.\n+//  Copyright (c) 2015 Branch Metrics. All rights reserved.\n+//\n+\n+#import \"BNCLinkCache.h\"\n+\n+@implementation BNCLinkCache\n+\n+- (id)init {\n+    self = [super init];\n+    if (self) {\n+        self.cache = [[NSMutableDictionary alloc] init];\n+    }\n+    return self;\n+}\n+\n+- (void)setObject:(NSString *)anObject forKey:(BNCLinkData *)aKey {\n+    [self.cache setObject:anObject forKey:aKey];\n+}\n+\n+- (NSString *)objectForKey:(BNCLinkData *)aKey {\n+    NSUInteger hashcode = [aKey hash];","path":"Branch-SDK/Branch-SDK/BNCLinkCache.m","position":26,"original_position":26,"commit_id":"614648b852639c438fbbd906489de45b6d94e958","original_commit_id":"d774ff282bd61addf4d85b7323d54ccb1737d09f","user":{"login":"qinweigong","id":8781874,"avatar_url":"https://avatars.githubusercontent.com/u/8781874?v=3","gravatar_id":"","url":"https://api.github.com/users/qinweigong","html_url":"https://github.com/qinweigong","followers_url":"https://api.github.com/users/qinweigong/followers","following_url":"https://api.github.com/users/qinweigong/following{/other_user}","gists_url":"https://api.github.com/users/qinweigong/gists{/gist_id}","starred_url":"https://api.github.com/users/qinweigong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinweigong/subscriptions","organizations_url":"https://api.github.com/users/qinweigong/orgs","repos_url":"https://api.github.com/users/qinweigong/repos","events_url":"https://api.github.com/users/qinweigong/events{/privacy}","received_events_url":"https://api.github.com/users/qinweigong/received_events","type":"User","site_admin":false},"body":"Something odd with Objective C's NSDictionary. It calls the hash function and returns the same hashcode, but [self.cache objectForKey:aKey] just returns nil","created_at":"2015-01-27T22:58:43Z","updated_at":"2015-01-27T22:58:43Z","html_url":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/40#discussion_r23651361","pull_request_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/comments/23651361"},"html":{"href":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/40#discussion_r23651361"},"pull_request":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40","id":27967937,"html_url":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/40","diff_url":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/40.diff","patch_url":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/40.patch","issue_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/40","number":40,"state":"open","locked":false,"title":"Cache link for same params","user":{"login":"qinweigong","id":8781874,"avatar_url":"https://avatars.githubusercontent.com/u/8781874?v=3","gravatar_id":"","url":"https://api.github.com/users/qinweigong","html_url":"https://github.com/qinweigong","followers_url":"https://api.github.com/users/qinweigong/followers","following_url":"https://api.github.com/users/qinweigong/following{/other_user}","gists_url":"https://api.github.com/users/qinweigong/gists{/gist_id}","starred_url":"https://api.github.com/users/qinweigong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinweigong/subscriptions","organizations_url":"https://api.github.com/users/qinweigong/orgs","repos_url":"https://api.github.com/users/qinweigong/repos","events_url":"https://api.github.com/users/qinweigong/events{/privacy}","received_events_url":"https://api.github.com/users/qinweigong/received_events","type":"User","site_admin":false},"body":"@aaustin ","created_at":"2015-01-24T00:59:36Z","updated_at":"2015-01-27T22:58:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba3c27b34065953e401e4c6026230a0ed88ab7ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40/commits","review_comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40/comments","review_comment_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/comments/{number}","comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/40/comments","statuses_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/614648b852639c438fbbd906489de45b6d94e958","head":{"label":"BranchMetrics:link-caching","ref":"link-caching","sha":"614648b852639c438fbbd906489de45b6d94e958","user":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"repo":{"id":20539166,"name":"Branch-iOS-SDK","full_name":"BranchMetrics/Branch-iOS-SDK","owner":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","description":"","fork":false,"url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK","forks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/forks","keys_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/teams","hooks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/hooks","issue_events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/events","assignees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/tags","blobs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/languages","stargazers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/stargazers","contributors_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contributors","subscribers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscribers","subscription_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscription","commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/comments/{number}","contents_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/merges","archive_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/downloads","issues_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/labels{/name}","releases_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/releases{/id}","created_at":"2014-06-05T19:56:21Z","updated_at":"2015-01-27T20:38:24Z","pushed_at":"2015-01-27T21:49:59Z","git_url":"git://github.com/BranchMetrics/Branch-iOS-SDK.git","ssh_url":"git@github.com:BranchMetrics/Branch-iOS-SDK.git","clone_url":"https://github.com/BranchMetrics/Branch-iOS-SDK.git","svn_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","homepage":"","size":8805,"stargazers_count":22,"watchers_count":22,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":22,"default_branch":"master"}},"base":{"label":"BranchMetrics:master","ref":"master","sha":"53f2ed3499fb026cfb47b69eb8b0f647c0a22d3a","user":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"repo":{"id":20539166,"name":"Branch-iOS-SDK","full_name":"BranchMetrics/Branch-iOS-SDK","owner":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","description":"","fork":false,"url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK","forks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/forks","keys_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/teams","hooks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/hooks","issue_events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/events","assignees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/tags","blobs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/languages","stargazers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/stargazers","contributors_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contributors","subscribers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscribers","subscription_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscription","commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/comments/{number}","contents_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/merges","archive_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/downloads","issues_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/labels{/name}","releases_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/releases{/id}","created_at":"2014-06-05T19:56:21Z","updated_at":"2015-01-27T20:38:24Z","pushed_at":"2015-01-27T21:49:59Z","git_url":"git://github.com/BranchMetrics/Branch-iOS-SDK.git","ssh_url":"git@github.com:BranchMetrics/Branch-iOS-SDK.git","clone_url":"https://github.com/BranchMetrics/Branch-iOS-SDK.git","svn_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","homepage":"","size":8805,"stargazers_count":22,"watchers_count":22,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40"},"html":{"href":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/40"},"issue":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/40"},"comments":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/614648b852639c438fbbd906489de45b6d94e958"}}}}