{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/12329","labels_url":"https://api.github.com/repos/angular/angular.js/issues/12329/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/12329/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/12329/events","html_url":"https://github.com/angular/angular.js/pull/12329","id":94520996,"number":12329,"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},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20misc%20core","name":"component: misc core","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20test","name":"needs: test","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/99","html_url":"https://github.com/angular/angular.js/milestones/1.4.4","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/99/labels","id":1208077,"number":99,"title":"1.4.4","description":"","creator":{"login":"matsko","id":93018,"avatar_url":"https://avatars.githubusercontent.com/u/93018?v=3","gravatar_id":"","url":"https://api.github.com/users/matsko","html_url":"https://github.com/matsko","followers_url":"https://api.github.com/users/matsko/followers","following_url":"https://api.github.com/users/matsko/following{/other_user}","gists_url":"https://api.github.com/users/matsko/gists{/gist_id}","starred_url":"https://api.github.com/users/matsko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matsko/subscriptions","organizations_url":"https://api.github.com/users/matsko/orgs","repos_url":"https://api.github.com/users/matsko/repos","events_url":"https://api.github.com/users/matsko/events{/privacy}","received_events_url":"https://api.github.com/users/matsko/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":1,"state":"open","created_at":"2015-07-14T20:35:40Z","updated_at":"2015-07-15T08:51:25Z","due_on":"2015-07-20T07:00:00Z","closed_at":null},"comments":7,"created_at":"2015-07-12T00:59:34Z","updated_at":"2015-07-16T07:58:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/12329","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"},"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"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/121870426","html_url":"https://github.com/angular/angular.js/pull/12329#issuecomment-121870426","issue_url":"https://api.github.com/repos/angular/angular.js/issues/12329","id":121870426,"user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T07:58:05Z","updated_at":"2015-07-16T07:58:05Z","body":"Regarding the `lruHash` test, it is not easy to test it directly without its being exposed, but an indirect test is described in this [CodePen][1].\r\n\r\n---\r\nNot directly related to this PR, but the `destroy` method needs some massaging I think.\r\n(At the very least, unsetting `freshEnd` and `staleEnd`, to allow them to be GC'ed. You can make a different PR if you fancy :smiley:)\r\n\r\n[1]: http://codepen.io/ExpertSystem/pen/VLdoGZ?editors=001"}}