{"action":"created","issue":{"url":"https://api.github.com/repos/medikoo/memoize/issues/28","labels_url":"https://api.github.com/repos/medikoo/memoize/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/medikoo/memoize/issues/28/comments","events_url":"https://api.github.com/repos/medikoo/memoize/issues/28/events","html_url":"https://github.com/medikoo/memoize/issues/28","id":53130208,"number":28,"title":"Object argument not getting cached for async function?","user":{"login":"vekexasia","id":200523,"avatar_url":"https://avatars.githubusercontent.com/u/200523?v=3","gravatar_id":"","url":"https://api.github.com/users/vekexasia","html_url":"https://github.com/vekexasia","followers_url":"https://api.github.com/users/vekexasia/followers","following_url":"https://api.github.com/users/vekexasia/following{/other_user}","gists_url":"https://api.github.com/users/vekexasia/gists{/gist_id}","starred_url":"https://api.github.com/users/vekexasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vekexasia/subscriptions","organizations_url":"https://api.github.com/users/vekexasia/orgs","repos_url":"https://api.github.com/users/vekexasia/repos","events_url":"https://api.github.com/users/vekexasia/events{/privacy}","received_events_url":"https://api.github.com/users/vekexasia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-30T17:08:56Z","updated_at":"2015-01-16T15:35:41Z","closed_at":"2015-01-06T12:30:36Z","body":"Hello there,\r\n\r\ni'm trying to memoize a request to a google server to not issue too many useless requests using the same tokens.\r\n\r\nIt looks like the tokens i pass ( a plain key,value object ) does not get \"cached\"..."},"comment":{"url":"https://api.github.com/repos/medikoo/memoize/issues/comments/70270504","html_url":"https://github.com/medikoo/memoize/issues/28#issuecomment-70270504","issue_url":"https://api.github.com/repos/medikoo/memoize/issues/28","id":70270504,"user":{"login":"medikoo","id":122434,"avatar_url":"https://avatars.githubusercontent.com/u/122434?v=3","gravatar_id":"","url":"https://api.github.com/users/medikoo","html_url":"https://github.com/medikoo","followers_url":"https://api.github.com/users/medikoo/followers","following_url":"https://api.github.com/users/medikoo/following{/other_user}","gists_url":"https://api.github.com/users/medikoo/gists{/gist_id}","starred_url":"https://api.github.com/users/medikoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medikoo/subscriptions","organizations_url":"https://api.github.com/users/medikoo/orgs","repos_url":"https://api.github.com/users/medikoo/repos","events_url":"https://api.github.com/users/medikoo/events{/privacy}","received_events_url":"https://api.github.com/users/medikoo/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T15:35:41Z","updated_at":"2015-01-16T15:35:41Z","body":"@ecaron sorry I was not precise, what `normalizer` receives is _arguments_ object of function call, and it's role is to return unique id on which bases uniqueness of arguments will be assumed.\r\n\r\nSo if you're interested only in first argument, same you're normalizer should generate id only against first one. So what I wrote, should be:\r\n\r\n```javascript\r\nvar memoized = memoize(cacheTest, { async: true, normalizer: function (args) {\r\n  return JSON.stringify(args[0]);\r\n} });\r\n```\r\n\r\n"}}