Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Allow Configuring Redis Database ID #171

Open
eyespies opened this issue Jul 25, 2016 · 0 comments
Open

Allow Configuring Redis Database ID #171

eyespies opened this issue Jul 25, 2016 · 0 comments
Labels

Comments

@eyespies
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants