stormpath-sdk-php icon indicating copy to clipboard operation
stormpath-sdk-php copied to clipboard

Allow Configuring Redis Database ID

Open eyespies opened this issue 9 years ago • 0 comments

Issue Type (Leave One)

Feature

Version affected

All

Summary

Within Redis it is possible to specify the ID of a database in which objects are saved. This allows segregating data within a single Redis instance so that a Redis 'flushdb' command does not clear other data sets.

Steps to Reproduce

Enable Redis caching - there is no option to set the database ID

Expected Results

When the Redis client is created, the system will set the database ID in the options list.

Actual Results

No option is can be provided so no option is set.

More Info

See the RedisCache class constructor:

    public function __construct($options)
    {
        $this->redis = new Redis();
        $this->redis->connect($options['redis']['host']);

        //if($options['redis']['password'] != NULL) {
            $this->redis->auth($options['redis']['password']);
        //}
        $this->prefix = "stormpath/";

    }

Also see the documentation -> http://docs.stormpath.com/php/product-guide/latest/configuration.html#setting-up-caching where only the hostname, port, and password can be set, but not the DB ID.

eyespies avatar Jul 25 '16 16:07 eyespies