{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/34430440","id":34430440,"diff_hunk":"@@ -223,6 +223,8 @@ function $CacheFactoryProvider() {\n             delete lruHash[key];\n           }\n \n+          if (!(key in data)) return;","path":"src/ng/cacheFactory.js","position":4,"original_position":4,"commit_id":"16c33cf26f952e0b6448270e53c4f1e177d29c1f","original_commit_id":"16c33cf26f952e0b6448270e53c4f1e177d29c1f","user":{"login":"tealtail","id":1327886,"avatar_url":"https://avatars.githubusercontent.com/u/1327886?v=3","gravatar_id":"","url":"https://api.github.com/users/tealtail","html_url":"https://github.com/tealtail","followers_url":"https://api.github.com/users/tealtail/followers","following_url":"https://api.github.com/users/tealtail/following{/other_user}","gists_url":"https://api.github.com/users/tealtail/gists{/gist_id}","starred_url":"https://api.github.com/users/tealtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tealtail/subscriptions","organizations_url":"https://api.github.com/users/tealtail/orgs","repos_url":"https://api.github.com/users/tealtail/repos","events_url":"https://api.github.com/users/tealtail/events{/privacy}","received_events_url":"https://api.github.com/users/tealtail/received_events","type":"User","site_admin":false},"body":"Could I get a bit more guidance as to how I should make use of `createMap` in this case, though? If I'm setting `data = createMap()`, wouldn't that effectively be clearing out everything that was being held inside of `data`?","created_at":"2015-07-13T02:46:35Z","updated_at":"2015-07-13T02:46:35Z","html_url":"https://github.com/angular/angular.js/pull/12329#discussion_r34430440","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/12329","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/34430440"},"html":{"href":"https://github.com/angular/angular.js/pull/12329#discussion_r34430440"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12329"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/12329","id":39754925,"html_url":"https://github.com/angular/angular.js/pull/12329","diff_url":"https://github.com/angular/angular.js/pull/12329.diff","patch_url":"https://github.com/angular/angular.js/pull/12329.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/12329","number":12329,"state":"open","locked":false,"title":"fix(cacheFactory): check key exists before decreasing size","user":{"login":"tealtail","id":1327886,"avatar_url":"https://avatars.githubusercontent.com/u/1327886?v=3","gravatar_id":"","url":"https://api.github.com/users/tealtail","html_url":"https://github.com/tealtail","followers_url":"https://api.github.com/users/tealtail/followers","following_url":"https://api.github.com/users/tealtail/following{/other_user}","gists_url":"https://api.github.com/users/tealtail/gists{/gist_id}","starred_url":"https://api.github.com/users/tealtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tealtail/subscriptions","organizations_url":"https://api.github.com/users/tealtail/orgs","repos_url":"https://api.github.com/users/tealtail/repos","events_url":"https://api.github.com/users/tealtail/events{/privacy}","received_events_url":"https://api.github.com/users/tealtail/received_events","type":"User","site_admin":false},"body":"When $cacheFactory.remove() is called, if the key does not exist, return\r\nbefore modifying size. There is currently no check for the key's\r\nexistence.\r\n\r\nCloses #12321","created_at":"2015-07-12T00:59:34Z","updated_at":"2015-07-13T02:46:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"217e2edcae5d4f41853a1b6797bf37d45284d18f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/12329/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/12329/comments","review_comment_url":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/12329/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/16c33cf26f952e0b6448270e53c4f1e177d29c1f","head":{"label":"tealtail:bugfix-cachefactory-remove","ref":"bugfix-cachefactory-remove","sha":"16c33cf26f952e0b6448270e53c4f1e177d29c1f","user":{"login":"tealtail","id":1327886,"avatar_url":"https://avatars.githubusercontent.com/u/1327886?v=3","gravatar_id":"","url":"https://api.github.com/users/tealtail","html_url":"https://github.com/tealtail","followers_url":"https://api.github.com/users/tealtail/followers","following_url":"https://api.github.com/users/tealtail/following{/other_user}","gists_url":"https://api.github.com/users/tealtail/gists{/gist_id}","starred_url":"https://api.github.com/users/tealtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tealtail/subscriptions","organizations_url":"https://api.github.com/users/tealtail/orgs","repos_url":"https://api.github.com/users/tealtail/repos","events_url":"https://api.github.com/users/tealtail/events{/privacy}","received_events_url":"https://api.github.com/users/tealtail/received_events","type":"User","site_admin":false},"repo":{"id":38942342,"name":"angular.js","full_name":"tealtail/angular.js","owner":{"login":"tealtail","id":1327886,"avatar_url":"https://avatars.githubusercontent.com/u/1327886?v=3","gravatar_id":"","url":"https://api.github.com/users/tealtail","html_url":"https://github.com/tealtail","followers_url":"https://api.github.com/users/tealtail/followers","following_url":"https://api.github.com/users/tealtail/following{/other_user}","gists_url":"https://api.github.com/users/tealtail/gists{/gist_id}","starred_url":"https://api.github.com/users/tealtail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tealtail/subscriptions","organizations_url":"https://api.github.com/users/tealtail/orgs","repos_url":"https://api.github.com/users/tealtail/repos","events_url":"https://api.github.com/users/tealtail/events{/privacy}","received_events_url":"https://api.github.com/users/tealtail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tealtail/angular.js","description":"HTML enhanced for web apps","fork":true,"url":"https://api.github.com/repos/tealtail/angular.js","forks_url":"https://api.github.com/repos/tealtail/angular.js/forks","keys_url":"https://api.github.com/repos/tealtail/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tealtail/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tealtail/angular.js/teams","hooks_url":"https://api.github.com/repos/tealtail/angular.js/hooks","issue_events_url":"https://api.github.com/repos/tealtail/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/tealtail/angular.js/events","assignees_url":"https://api.github.com/repos/tealtail/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/tealtail/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/tealtail/angular.js/tags","blobs_url":"https://api.github.com/repos/tealtail/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tealtail/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tealtail/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/tealtail/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tealtail/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/tealtail/angular.js/languages","stargazers_url":"https://api.github.com/repos/tealtail/angular.js/stargazers","contributors_url":"https://api.github.com/repos/tealtail/angular.js/contributors","subscribers_url":"https://api.github.com/repos/tealtail/angular.js/subscribers","subscription_url":"https://api.github.com/repos/tealtail/angular.js/subscription","commits_url":"https://api.github.com/repos/tealtail/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/tealtail/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/tealtail/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/tealtail/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/tealtail/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/tealtail/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tealtail/angular.js/merges","archive_url":"https://api.github.com/repos/tealtail/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tealtail/angular.js/downloads","issues_url":"https://api.github.com/repos/tealtail/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/tealtail/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/tealtail/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/tealtail/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tealtail/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/tealtail/angular.js/releases{/id}","created_at":"2015-07-11T22:19:14Z","updated_at":"2015-07-11T22:19:30Z","pushed_at":"2015-07-12T00:57:22Z","git_url":"git://github.com/tealtail/angular.js.git","ssh_url":"git@github.com:tealtail/angular.js.git","clone_url":"https://github.com/tealtail/angular.js.git","svn_url":"https://github.com/tealtail/angular.js","homepage":"http://angularjs.org","size":237007,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"9ea52d818bcd2fb3ea8ccc85bf47f9fd5af68843","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":460078,"name":"angular.js","full_name":"angular/angular.js","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.js","description":"HTML enhanced for web apps","fork":false,"url":"https://api.github.com/repos/angular/angular.js","forks_url":"https://api.github.com/repos/angular/angular.js/forks","keys_url":"https://api.github.com/repos/angular/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.js/teams","hooks_url":"https://api.github.com/repos/angular/angular.js/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.js/events","assignees_url":"https://api.github.com/repos/angular/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.js/tags","blobs_url":"https://api.github.com/repos/angular/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.js/languages","stargazers_url":"https://api.github.com/repos/angular/angular.js/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.js/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.js/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.js/subscription","commits_url":"https://api.github.com/repos/angular/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.js/merges","archive_url":"https://api.github.com/repos/angular/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.js/downloads","issues_url":"https://api.github.com/repos/angular/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.js/releases{/id}","created_at":"2010-01-06T00:34:37Z","updated_at":"2015-07-13T02:19:16Z","pushed_at":"2015-07-12T20:54:28Z","git_url":"git://github.com/angular/angular.js.git","ssh_url":"git@github.com:angular/angular.js.git","clone_url":"https://github.com/angular/angular.js.git","svn_url":"https://github.com/angular/angular.js","homepage":"http://angularjs.org","size":237007,"stargazers_count":40594,"watchers_count":40594,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17562,"mirror_url":null,"open_issues_count":1256,"forks":17562,"open_issues":1256,"watchers":40594,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12329"},"html":{"href":"https://github.com/angular/angular.js/pull/12329"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/12329"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/12329/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12329/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12329/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/16c33cf26f952e0b6448270e53c4f1e177d29c1f"}}}}