{"action":"created","comment":{"url":"https://api.github.com/repos/optimizely/nuclear-js/pulls/comments/50773425","id":50773425,"diff_hunk":"@@ -102,6 +102,35 @@ function getStoreDeps(getter) {\n   return storeDeps\n }\n \n+/**\n+ * Add override options to a getter\n+ * @param {getter} getter\n+ * @param {object} options\n+ * @param {boolean} options.useCache\n+ * @param {*} options.cacheKey\n+ * @returns {getter}\n+ */\n+function addGetterOptions(getter, options) {","path":"src/getter.js","position":12,"original_position":12,"commit_id":"da98531ee4c3f0d24851ef9d630e7f755881f232","original_commit_id":"da98531ee4c3f0d24851ef9d630e7f755881f232","user":{"login":"jordangarcia","id":454066,"avatar_url":"https://avatars.githubusercontent.com/u/454066?v=3","gravatar_id":"","url":"https://api.github.com/users/jordangarcia","html_url":"https://github.com/jordangarcia","followers_url":"https://api.github.com/users/jordangarcia/followers","following_url":"https://api.github.com/users/jordangarcia/following{/other_user}","gists_url":"https://api.github.com/users/jordangarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/jordangarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordangarcia/subscriptions","organizations_url":"https://api.github.com/users/jordangarcia/orgs","repos_url":"https://api.github.com/users/jordangarcia/repos","events_url":"https://api.github.com/users/jordangarcia/events{/privacy}","received_events_url":"https://api.github.com/users/jordangarcia/received_events","type":"User","site_admin":false},"body":"I would like to see a `Getter` constructor.\r\n\r\n```js\r\nvar getter = Getter(['items']);\r\n// or\r\nvar getter = Getter(['items'], {\r\n  useCache: false\r\n});\r\n```\r\n\r\n","created_at":"2016-01-25T23:21:50Z","updated_at":"2016-01-25T23:21:50Z","html_url":"https://github.com/optimizely/nuclear-js/pull/208#discussion_r50773425","pull_request_url":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208","_links":{"self":{"href":"https://api.github.com/repos/optimizely/nuclear-js/pulls/comments/50773425"},"html":{"href":"https://github.com/optimizely/nuclear-js/pull/208#discussion_r50773425"},"pull_request":{"href":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208"}}},"pull_request":{"url":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208","id":57126615,"html_url":"https://github.com/optimizely/nuclear-js/pull/208","diff_url":"https://github.com/optimizely/nuclear-js/pull/208.diff","patch_url":"https://github.com/optimizely/nuclear-js/pull/208.patch","issue_url":"https://api.github.com/repos/optimizely/nuclear-js/issues/208","number":208,"state":"open","locked":false,"title":"Caching stuff","user":{"login":"scjackson","id":2582985,"avatar_url":"https://avatars.githubusercontent.com/u/2582985?v=3","gravatar_id":"","url":"https://api.github.com/users/scjackson","html_url":"https://github.com/scjackson","followers_url":"https://api.github.com/users/scjackson/followers","following_url":"https://api.github.com/users/scjackson/following{/other_user}","gists_url":"https://api.github.com/users/scjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/scjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scjackson/subscriptions","organizations_url":"https://api.github.com/users/scjackson/orgs","repos_url":"https://api.github.com/users/scjackson/repos","events_url":"https://api.github.com/users/scjackson/events{/privacy}","received_events_url":"https://api.github.com/users/scjackson/received_events","type":"User","site_admin":false},"body":"@jordangarcia @mikeng13 \r\n\r\nAdded a number of options/functionality around caching including:\r\n\r\n1. `getCacheValues` and `clearCacheValues` to `Reactor`. This will allow users to monitor their own cache usage and clear it if need be.\r\n2. `useCache` and `maxItemsToCache` as config options for `Reactor`. This will allow users to disable caching completely, or limit the number of items that are stored in cache. Items are evicted from cache on a standard LRU policy.\r\n3. A utility function for getters, `addOptionsToGetter`, which accepts a getter and augments it with options. Currently supported options are `useCache`, which allows users to specify whether the getter value should be cached on evaluate, and `cacheKey`, which allows users to specify their own cache key.","created_at":"2016-01-25T20:36:18Z","updated_at":"2016-01-25T23:21:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"428672987214cc404500c61064d6cb699a56c029","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208/commits","review_comments_url":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208/comments","review_comment_url":"https://api.github.com/repos/optimizely/nuclear-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/optimizely/nuclear-js/issues/208/comments","statuses_url":"https://api.github.com/repos/optimizely/nuclear-js/statuses/da98531ee4c3f0d24851ef9d630e7f755881f232","head":{"label":"optimizely:sam/lru-cache","ref":"sam/lru-cache","sha":"da98531ee4c3f0d24851ef9d630e7f755881f232","user":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"repo":{"id":24073130,"name":"nuclear-js","full_name":"optimizely/nuclear-js","owner":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/optimizely/nuclear-js","description":"Reactive Flux built with ImmutableJS data structures. Framework agnostic.","fork":false,"url":"https://api.github.com/repos/optimizely/nuclear-js","forks_url":"https://api.github.com/repos/optimizely/nuclear-js/forks","keys_url":"https://api.github.com/repos/optimizely/nuclear-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/optimizely/nuclear-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/optimizely/nuclear-js/teams","hooks_url":"https://api.github.com/repos/optimizely/nuclear-js/hooks","issue_events_url":"https://api.github.com/repos/optimizely/nuclear-js/issues/events{/number}","events_url":"https://api.github.com/repos/optimizely/nuclear-js/events","assignees_url":"https://api.github.com/repos/optimizely/nuclear-js/assignees{/user}","branches_url":"https://api.github.com/repos/optimizely/nuclear-js/branches{/branch}","tags_url":"https://api.github.com/repos/optimizely/nuclear-js/tags","blobs_url":"https://api.github.com/repos/optimizely/nuclear-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/optimizely/nuclear-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/optimizely/nuclear-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/optimizely/nuclear-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/optimizely/nuclear-js/statuses/{sha}","languages_url":"https://api.github.com/repos/optimizely/nuclear-js/languages","stargazers_url":"https://api.github.com/repos/optimizely/nuclear-js/stargazers","contributors_url":"https://api.github.com/repos/optimizely/nuclear-js/contributors","subscribers_url":"https://api.github.com/repos/optimizely/nuclear-js/subscribers","subscription_url":"https://api.github.com/repos/optimizely/nuclear-js/subscription","commits_url":"https://api.github.com/repos/optimizely/nuclear-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/optimizely/nuclear-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/optimizely/nuclear-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/optimizely/nuclear-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/optimizely/nuclear-js/contents/{+path}","compare_url":"https://api.github.com/repos/optimizely/nuclear-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/optimizely/nuclear-js/merges","archive_url":"https://api.github.com/repos/optimizely/nuclear-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/optimizely/nuclear-js/downloads","issues_url":"https://api.github.com/repos/optimizely/nuclear-js/issues{/number}","pulls_url":"https://api.github.com/repos/optimizely/nuclear-js/pulls{/number}","milestones_url":"https://api.github.com/repos/optimizely/nuclear-js/milestones{/number}","notifications_url":"https://api.github.com/repos/optimizely/nuclear-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/optimizely/nuclear-js/labels{/name}","releases_url":"https://api.github.com/repos/optimizely/nuclear-js/releases{/id}","deployments_url":"https://api.github.com/repos/optimizely/nuclear-js/deployments","created_at":"2014-09-15T20:42:54Z","updated_at":"2016-01-25T22:10:18Z","pushed_at":"2016-01-25T20:36:19Z","git_url":"git://github.com/optimizely/nuclear-js.git","ssh_url":"git@github.com:optimizely/nuclear-js.git","clone_url":"https://github.com/optimizely/nuclear-js.git","svn_url":"https://github.com/optimizely/nuclear-js","homepage":"https://optimizely.github.io/nuclear-js/","size":5292,"stargazers_count":1142,"watchers_count":1142,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":83,"mirror_url":null,"open_issues_count":20,"forks":83,"open_issues":20,"watchers":1142,"default_branch":"master"}},"base":{"label":"optimizely:master","ref":"master","sha":"1444ce6b89c91031c989ff07cf168e630facb00a","user":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"repo":{"id":24073130,"name":"nuclear-js","full_name":"optimizely/nuclear-js","owner":{"login":"optimizely","id":1274132,"avatar_url":"https://avatars.githubusercontent.com/u/1274132?v=3","gravatar_id":"","url":"https://api.github.com/users/optimizely","html_url":"https://github.com/optimizely","followers_url":"https://api.github.com/users/optimizely/followers","following_url":"https://api.github.com/users/optimizely/following{/other_user}","gists_url":"https://api.github.com/users/optimizely/gists{/gist_id}","starred_url":"https://api.github.com/users/optimizely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optimizely/subscriptions","organizations_url":"https://api.github.com/users/optimizely/orgs","repos_url":"https://api.github.com/users/optimizely/repos","events_url":"https://api.github.com/users/optimizely/events{/privacy}","received_events_url":"https://api.github.com/users/optimizely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/optimizely/nuclear-js","description":"Reactive Flux built with ImmutableJS data structures. Framework agnostic.","fork":false,"url":"https://api.github.com/repos/optimizely/nuclear-js","forks_url":"https://api.github.com/repos/optimizely/nuclear-js/forks","keys_url":"https://api.github.com/repos/optimizely/nuclear-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/optimizely/nuclear-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/optimizely/nuclear-js/teams","hooks_url":"https://api.github.com/repos/optimizely/nuclear-js/hooks","issue_events_url":"https://api.github.com/repos/optimizely/nuclear-js/issues/events{/number}","events_url":"https://api.github.com/repos/optimizely/nuclear-js/events","assignees_url":"https://api.github.com/repos/optimizely/nuclear-js/assignees{/user}","branches_url":"https://api.github.com/repos/optimizely/nuclear-js/branches{/branch}","tags_url":"https://api.github.com/repos/optimizely/nuclear-js/tags","blobs_url":"https://api.github.com/repos/optimizely/nuclear-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/optimizely/nuclear-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/optimizely/nuclear-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/optimizely/nuclear-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/optimizely/nuclear-js/statuses/{sha}","languages_url":"https://api.github.com/repos/optimizely/nuclear-js/languages","stargazers_url":"https://api.github.com/repos/optimizely/nuclear-js/stargazers","contributors_url":"https://api.github.com/repos/optimizely/nuclear-js/contributors","subscribers_url":"https://api.github.com/repos/optimizely/nuclear-js/subscribers","subscription_url":"https://api.github.com/repos/optimizely/nuclear-js/subscription","commits_url":"https://api.github.com/repos/optimizely/nuclear-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/optimizely/nuclear-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/optimizely/nuclear-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/optimizely/nuclear-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/optimizely/nuclear-js/contents/{+path}","compare_url":"https://api.github.com/repos/optimizely/nuclear-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/optimizely/nuclear-js/merges","archive_url":"https://api.github.com/repos/optimizely/nuclear-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/optimizely/nuclear-js/downloads","issues_url":"https://api.github.com/repos/optimizely/nuclear-js/issues{/number}","pulls_url":"https://api.github.com/repos/optimizely/nuclear-js/pulls{/number}","milestones_url":"https://api.github.com/repos/optimizely/nuclear-js/milestones{/number}","notifications_url":"https://api.github.com/repos/optimizely/nuclear-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/optimizely/nuclear-js/labels{/name}","releases_url":"https://api.github.com/repos/optimizely/nuclear-js/releases{/id}","deployments_url":"https://api.github.com/repos/optimizely/nuclear-js/deployments","created_at":"2014-09-15T20:42:54Z","updated_at":"2016-01-25T22:10:18Z","pushed_at":"2016-01-25T20:36:19Z","git_url":"git://github.com/optimizely/nuclear-js.git","ssh_url":"git@github.com:optimizely/nuclear-js.git","clone_url":"https://github.com/optimizely/nuclear-js.git","svn_url":"https://github.com/optimizely/nuclear-js","homepage":"https://optimizely.github.io/nuclear-js/","size":5292,"stargazers_count":1142,"watchers_count":1142,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":83,"mirror_url":null,"open_issues_count":20,"forks":83,"open_issues":20,"watchers":1142,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208"},"html":{"href":"https://github.com/optimizely/nuclear-js/pull/208"},"issue":{"href":"https://api.github.com/repos/optimizely/nuclear-js/issues/208"},"comments":{"href":"https://api.github.com/repos/optimizely/nuclear-js/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/optimizely/nuclear-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/optimizely/nuclear-js/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/optimizely/nuclear-js/statuses/da98531ee4c3f0d24851ef9d630e7f755881f232"}}}}