{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/30916325","id":30916325,"diff_hunk":"@@ -204,3 +204,18 @@ If you wish to use a different storage backend (`SessionStorage`, for instance),\n `storageBackend` requires that you pass it an object which has `getObject(key)` and `setObject(key, val)` methods. `LocalStorage` and `SessionStorage` are both provided by EncoreUI, and support this interface.\n \n You can use your own custom backends as well, as long as it supports `getObject(key)` and `setObject(key, val)`.\n+\n+### Custom Storage Key Values\n+Sometimes, it may be necessary change how a key is formed for the specified `storageBackend`. As previously stated, these are calculated by prepending `'rxAutoSave::'` before the url. You can override this by passing in a `keyShaping` function to the options object.\n+\n+An example one would be as follows:\n+\n+```\n+    var autosave = rxAutoSave($scope, 'formData', {\n+        keyShaping: function (key) {\n+            return key.replace('?cache=false', '');\n+        }\n+    });\n+```\n+\n+The above example could be used to have the current url ignore any cacheing flags passed in. By default, `keyShaping` just returns the original calculated key.","path":"src/rxMisc/README.md","position":18,"original_position":18,"commit_id":"05ab89e5ff94fbd2046eb1d14ef6df8f10fa10f0","original_commit_id":"05ab89e5ff94fbd2046eb1d14ef6df8f10fa10f0","user":{"login":"parlarjb","id":9376,"avatar_url":"https://avatars.githubusercontent.com/u/9376?v=3","gravatar_id":"","url":"https://api.github.com/users/parlarjb","html_url":"https://github.com/parlarjb","followers_url":"https://api.github.com/users/parlarjb/followers","following_url":"https://api.github.com/users/parlarjb/following{/other_user}","gists_url":"https://api.github.com/users/parlarjb/gists{/gist_id}","starred_url":"https://api.github.com/users/parlarjb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parlarjb/subscriptions","organizations_url":"https://api.github.com/users/parlarjb/orgs","repos_url":"https://api.github.com/users/parlarjb/repos","events_url":"https://api.github.com/users/parlarjb/events{/privacy}","received_events_url":"https://api.github.com/users/parlarjb/received_events","type":"User","site_admin":false},"body":"\"caching\"","created_at":"2015-05-22T17:51:13Z","updated_at":"2015-05-22T17:51:13Z","html_url":"https://github.com/rackerlabs/encore-ui/pull/970#discussion_r30916325","pull_request_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/30916325"},"html":{"href":"https://github.com/rackerlabs/encore-ui/pull/970#discussion_r30916325"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970","id":35740500,"html_url":"https://github.com/rackerlabs/encore-ui/pull/970","diff_url":"https://github.com/rackerlabs/encore-ui/pull/970.diff","patch_url":"https://github.com/rackerlabs/encore-ui/pull/970.patch","issue_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/970","number":970,"state":"open","locked":false,"title":"Add in keyMapping function to rxAutoSave","user":{"login":"nickburns2006","id":1036328,"avatar_url":"https://avatars.githubusercontent.com/u/1036328?v=3","gravatar_id":"","url":"https://api.github.com/users/nickburns2006","html_url":"https://github.com/nickburns2006","followers_url":"https://api.github.com/users/nickburns2006/followers","following_url":"https://api.github.com/users/nickburns2006/following{/other_user}","gists_url":"https://api.github.com/users/nickburns2006/gists{/gist_id}","starred_url":"https://api.github.com/users/nickburns2006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickburns2006/subscriptions","organizations_url":"https://api.github.com/users/nickburns2006/orgs","repos_url":"https://api.github.com/users/nickburns2006/repos","events_url":"https://api.github.com/users/nickburns2006/events{/privacy}","received_events_url":"https://api.github.com/users/nickburns2006/received_events","type":"User","site_admin":false},"body":"So I was using `rxAutoSave` and figured out that I needed to change how the keys are stored in localstorage, so I had to completely overwrite the storage method.\r\n\r\nThought that was a bit overkill and thought this would be a more \"elegant\" solution","created_at":"2015-05-19T15:08:56Z","updated_at":"2015-05-22T17:51:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a9b43f29ffb7f70e28c4c8a16f5d2e5f14b9150","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/970/comments","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/05ab89e5ff94fbd2046eb1d14ef6df8f10fa10f0","head":{"label":"rackerlabs:rxAutoSave-key-change-func","ref":"rxAutoSave-key-change-func","sha":"05ab89e5ff94fbd2046eb1d14ef6df8f10fa10f0","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":11432401,"name":"encore-ui","full_name":"rackerlabs/encore-ui","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/encore-ui","description":"UI Framework for Encore","fork":false,"url":"https://api.github.com/repos/rackerlabs/encore-ui","forks_url":"https://api.github.com/repos/rackerlabs/encore-ui/forks","keys_url":"https://api.github.com/repos/rackerlabs/encore-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/encore-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/encore-ui/teams","hooks_url":"https://api.github.com/repos/rackerlabs/encore-ui/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/encore-ui/events","assignees_url":"https://api.github.com/repos/rackerlabs/encore-ui/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/encore-ui/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/tags","blobs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/encore-ui/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/encore-ui/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/encore-ui/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscription","commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/encore-ui/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/encore-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/encore-ui/merges","archive_url":"https://api.github.com/repos/rackerlabs/encore-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/encore-ui/downloads","issues_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/encore-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/encore-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/encore-ui/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/encore-ui/releases{/id}","created_at":"2013-07-15T20:06:52Z","updated_at":"2015-05-08T18:02:18Z","pushed_at":"2015-05-22T16:12:26Z","git_url":"git://github.com/rackerlabs/encore-ui.git","ssh_url":"git@github.com:rackerlabs/encore-ui.git","clone_url":"https://github.com/rackerlabs/encore-ui.git","svn_url":"https://github.com/rackerlabs/encore-ui","homepage":"http://rackerlabs.github.io/encore-ui/","size":31589,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":88,"forks":29,"open_issues":88,"watchers":25,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"395d845d469bff3f72167df90cf9361341f959e4","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":11432401,"name":"encore-ui","full_name":"rackerlabs/encore-ui","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/encore-ui","description":"UI Framework for Encore","fork":false,"url":"https://api.github.com/repos/rackerlabs/encore-ui","forks_url":"https://api.github.com/repos/rackerlabs/encore-ui/forks","keys_url":"https://api.github.com/repos/rackerlabs/encore-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/encore-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/encore-ui/teams","hooks_url":"https://api.github.com/repos/rackerlabs/encore-ui/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/encore-ui/events","assignees_url":"https://api.github.com/repos/rackerlabs/encore-ui/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/encore-ui/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/tags","blobs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/encore-ui/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/encore-ui/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/encore-ui/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscription","commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/encore-ui/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/encore-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/encore-ui/merges","archive_url":"https://api.github.com/repos/rackerlabs/encore-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/encore-ui/downloads","issues_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/encore-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/encore-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/encore-ui/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/encore-ui/releases{/id}","created_at":"2013-07-15T20:06:52Z","updated_at":"2015-05-08T18:02:18Z","pushed_at":"2015-05-22T16:12:26Z","git_url":"git://github.com/rackerlabs/encore-ui.git","ssh_url":"git@github.com:rackerlabs/encore-ui.git","clone_url":"https://github.com/rackerlabs/encore-ui.git","svn_url":"https://github.com/rackerlabs/encore-ui","homepage":"http://rackerlabs.github.io/encore-ui/","size":31589,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":88,"forks":29,"open_issues":88,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970"},"html":{"href":"https://github.com/rackerlabs/encore-ui/pull/970"},"issue":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/issues/970"},"comments":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/issues/970/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/970/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/05ab89e5ff94fbd2046eb1d14ef6df8f10fa10f0"}}}}