{"action":"created","issue":{"url":"https://api.github.com/repos/KarelCemus/play-redis/issues/20","labels_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/20/comments","events_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/20/events","html_url":"https://github.com/KarelCemus/play-redis/issues/20","id":116485267,"number":20,"title":"Flexible Configuration By Mode","user":{"login":"neilchaudhuri","id":1239158,"avatar_url":"https://avatars.githubusercontent.com/u/1239158?v=3","gravatar_id":"","url":"https://api.github.com/users/neilchaudhuri","html_url":"https://github.com/neilchaudhuri","followers_url":"https://api.github.com/users/neilchaudhuri/followers","following_url":"https://api.github.com/users/neilchaudhuri/following{/other_user}","gists_url":"https://api.github.com/users/neilchaudhuri/gists{/gist_id}","starred_url":"https://api.github.com/users/neilchaudhuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilchaudhuri/subscriptions","organizations_url":"https://api.github.com/users/neilchaudhuri/orgs","repos_url":"https://api.github.com/users/neilchaudhuri/repos","events_url":"https://api.github.com/users/neilchaudhuri/events{/privacy}","received_events_url":"https://api.github.com/users/neilchaudhuri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-12T05:49:26Z","updated_at":"2015-11-12T19:09:12Z","closed_at":null,"body":"I would like to easily switch my caching approach based on whether I'm in Play's *dev*, *test*, or *prod* mode. \r\n\r\nIn a perfect world, I would like the option to use Ehcache in dev and Redis in test and prod. \r\n\r\nIf I can't do that, then I would like to have `configuration` be `local` in dev (after installing Redis locally) and `heroku` in test and prod. Because the configuration is defined statically in *application.conf*, I think the only way I can toggle between these is with environment variables. I think it would be better if I could take a more dependency-injection-based approach where I bind the appropriate `Configuration` implementation according to mode. I guess I could do that with `none`, but it seems to me that it's better to remove static configuration from *application.conf* entirely and instead have a default binding to the `local` instance of `Configuration` and allow other bindings to override the default as needed. \r\n\r\nDoes this make sense? Does the current codebase offer this sort of flexibility already? I might be missing it.\r\n\r\nThanks. "},"comment":{"url":"https://api.github.com/repos/KarelCemus/play-redis/issues/comments/156204346","html_url":"https://github.com/KarelCemus/play-redis/issues/20#issuecomment-156204346","issue_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/20","id":156204346,"user":{"login":"neilchaudhuri","id":1239158,"avatar_url":"https://avatars.githubusercontent.com/u/1239158?v=3","gravatar_id":"","url":"https://api.github.com/users/neilchaudhuri","html_url":"https://github.com/neilchaudhuri","followers_url":"https://api.github.com/users/neilchaudhuri/followers","following_url":"https://api.github.com/users/neilchaudhuri/following{/other_user}","gists_url":"https://api.github.com/users/neilchaudhuri/gists{/gist_id}","starred_url":"https://api.github.com/users/neilchaudhuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilchaudhuri/subscriptions","organizations_url":"https://api.github.com/users/neilchaudhuri/orgs","repos_url":"https://api.github.com/users/neilchaudhuri/repos","events_url":"https://api.github.com/users/neilchaudhuri/events{/privacy}","received_events_url":"https://api.github.com/users/neilchaudhuri/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T19:09:12Z","updated_at":"2015-11-12T19:09:12Z","body":"I can see the argument to defaulting to `local` too. That's cool."}}