{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/globalize/issues/470","labels_url":"https://api.github.com/repos/jquery/globalize/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/jquery/globalize/issues/470/comments","events_url":"https://api.github.com/repos/jquery/globalize/issues/470/events","html_url":"https://github.com/jquery/globalize/pull/470","id":96889408,"number":470,"title":"Cache support","user":{"login":"rxaviers","id":967155,"avatar_url":"https://avatars.githubusercontent.com/u/967155?v=3","gravatar_id":"","url":"https://api.github.com/users/rxaviers","html_url":"https://github.com/rxaviers","followers_url":"https://api.github.com/users/rxaviers/followers","following_url":"https://api.github.com/users/rxaviers/following{/other_user}","gists_url":"https://api.github.com/users/rxaviers/gists{/gist_id}","starred_url":"https://api.github.com/users/rxaviers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxaviers/subscriptions","organizations_url":"https://api.github.com/users/rxaviers/orgs","repos_url":"https://api.github.com/users/rxaviers/repos","events_url":"https://api.github.com/users/rxaviers/events{/privacy}","received_events_url":"https://api.github.com/users/rxaviers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jquery/globalize/labels/CLA:%20Valid","name":"CLA: Valid","color":"007700"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-23T19:34:58Z","updated_at":"2015-07-24T17:16:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jquery/globalize/pulls/470","html_url":"https://github.com/jquery/globalize/pull/470","diff_url":"https://github.com/jquery/globalize/pull/470.diff","patch_url":"https://github.com/jquery/globalize/pull/470.patch"},"body":"Requires:\r\n- [ ] #398"},"comment":{"url":"https://api.github.com/repos/jquery/globalize/issues/comments/124584101","html_url":"https://github.com/jquery/globalize/pull/470#issuecomment-124584101","issue_url":"https://api.github.com/repos/jquery/globalize/issues/470","id":124584101,"user":{"login":"dpolivy","id":3200655,"avatar_url":"https://avatars.githubusercontent.com/u/3200655?v=3","gravatar_id":"","url":"https://api.github.com/users/dpolivy","html_url":"https://github.com/dpolivy","followers_url":"https://api.github.com/users/dpolivy/followers","following_url":"https://api.github.com/users/dpolivy/following{/other_user}","gists_url":"https://api.github.com/users/dpolivy/gists{/gist_id}","starred_url":"https://api.github.com/users/dpolivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpolivy/subscriptions","organizations_url":"https://api.github.com/users/dpolivy/orgs","repos_url":"https://api.github.com/users/dpolivy/repos","events_url":"https://api.github.com/users/dpolivy/events{/privacy}","received_events_url":"https://api.github.com/users/dpolivy/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T17:16:05Z","updated_at":"2015-07-24T17:16:05Z","body":"@rxaviers @jzaefferer I haven't followed the runtime PR too closely, but I guess my main question is, would that be easy to incorporate into a node.js environment? At a high level it makes sense, but it also looks a lot more complicated than `npm install globalize cldr-data` and `require('globalize')`.\r\n\r\n*As an aside, I've actually seen ~2-3 second startup time increase in our node app since adding in i18n support with globalize (mostly loading all the CLDR JSON), so any possible optimizations would be great to incorporate (especially if they include caching).*\r\n\r\nHere's how I'm doing [my own caching](https://github.com/dpolivy/express-globalize/blob/master/lib/helper.js) in [express-globalize](https://github.com/dpolivy/express-globalize) (a library I'm working on for integrating with *express*). It's serviceable, but really I think the library should handle this automatically. The main challenge is just consistently \"hashing\" the `options` for each formatter to avoid duplication. I'm not sure `JSON.stringify` is ideal as it might not account for different ordering of parameters, but I wanted something that would be super cheap to calculate (otherwise you lose the benefit of caching in the first place)."}}