{"action":"created","issue":{"url":"https://api.github.com/repos/stormpath/stormpath-express/issues/57","labels_url":"https://api.github.com/repos/stormpath/stormpath-express/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/stormpath/stormpath-express/issues/57/comments","events_url":"https://api.github.com/repos/stormpath/stormpath-express/issues/57/events","html_url":"https://github.com/stormpath/stormpath-express/issues/57","id":63420574,"number":57,"title":"Allow init to accept an already configured cache client","user":{"login":"TomDunn","id":1294171,"avatar_url":"https://avatars.githubusercontent.com/u/1294171?v=3","gravatar_id":"","url":"https://api.github.com/users/TomDunn","html_url":"https://github.com/TomDunn","followers_url":"https://api.github.com/users/TomDunn/followers","following_url":"https://api.github.com/users/TomDunn/following{/other_user}","gists_url":"https://api.github.com/users/TomDunn/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDunn/subscriptions","organizations_url":"https://api.github.com/users/TomDunn/orgs","repos_url":"https://api.github.com/users/TomDunn/repos","events_url":"https://api.github.com/users/TomDunn/events{/privacy}","received_events_url":"https://api.github.com/users/TomDunn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-21T15:55:20Z","updated_at":"2015-03-25T17:21:13Z","closed_at":null,"body":"First off, I've really enjoyed using Stormpath so far. Great work!\r\n\r\nI'm looking to enable caching for my app. I see that the [product guide](http://docs.stormpath.com/nodejs/express/product.html#enable-caching) describes how you can tell stormpath what the host, port, and auth options are for the cache and then it makes its own connection to the cache.\r\n\r\nWhy not just accept an already configured cache client as well? I ask because in my app I have several other components that depend on a redis client, so instead of creating a client for every component I create one client and inject it into every component that needs it. The connection details change depending on the stage of the app so by using injection I isolate the stage/connection details to the one part of my app that is responsible for creating the client.\r\n\r\nI explained my use case, and I think in general this would provide value for other users as well. What are your thoughts? I'd be willing to submit a PR if you like this idea.\r\n\r\nThanks again!"},"comment":{"url":"https://api.github.com/repos/stormpath/stormpath-express/issues/comments/86130143","html_url":"https://github.com/stormpath/stormpath-express/issues/57#issuecomment-86130143","issue_url":"https://api.github.com/repos/stormpath/stormpath-express/issues/57","id":86130143,"user":{"login":"robertjd","id":132343,"avatar_url":"https://avatars.githubusercontent.com/u/132343?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjd","html_url":"https://github.com/robertjd","followers_url":"https://api.github.com/users/robertjd/followers","following_url":"https://api.github.com/users/robertjd/following{/other_user}","gists_url":"https://api.github.com/users/robertjd/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjd/subscriptions","organizations_url":"https://api.github.com/users/robertjd/orgs","repos_url":"https://api.github.com/users/robertjd/repos","events_url":"https://api.github.com/users/robertjd/events{/privacy}","received_events_url":"https://api.github.com/users/robertjd/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T17:21:13Z","updated_at":"2015-03-25T17:21:13Z","body":"I agree!  The underlying Node SDK does support this, see the docs here and note the `client` option:\r\n\r\nhttp://docs.stormpath.com/nodejs/api/client#redis\r\n\r\nFor a PR, I think we need to pass that option here:\r\n\r\nhttps://github.com/stormpath/stormpath-express/blob/daaf31023043e5077b167566faf5740a0cb8345a/lib/stormpath.js#L39"}}