johanlaidlaw/RedisAdmin — pull request #12 by royfox (2012-08-10 14:37:21+00:00)
Title: Use RedisAdmin to manage multiple environments

This change allows you to switch between different environments in the RedisAdmin UI. You define the environments in the environment.php file, like so:

$config = array(
'environment' => array(
'production' => 6379,
'testing' => 6378
)
);

If $config['environment'] is not defined, then the current `REDIS_DB_PORT` will be used. If the environments are defined, then a select box in the UI allows you to choose between environments (all this does on the backend is set the port used to access Redis, so you can only manage multiple Redis instances this way if they are installed on different ports at the same IP).

Additionally, I have created a Config class which is attached in `ApplicationController`, and is therefore accessible from every controller. This means you can stuff like this in your controllers:

$this->Config->get("environment", "testing"); // return 6378
$this->Config->exists("environment, "uat"); //returns false