src/Cache/Driver/RedisDriver.php
protected function selectCurrentDatabase()
    {
        static $selected = null;

        $db = &$this->option['db'];
        $current = $this->id . ':' . $db;
        if ($selected !== $current) {
            $select_ret = $this->link->select($db);
            if ($select_ret) {
                $selected = $current;
            } else {
                throw new CoreException("Redis select DB($current) failed!");
            }
        }
    }
protected function selectCurrentDatabase()
    {
        static $selected = null;

        $db = &$this->option['db'];
        $current = $this->id . ':' . $db;
        if ($selected !== $current) {
            $select_ret = $this->link->select($db);
            if ($select_ret) {
                $selected = $current;
            } else {
                throw new CoreException("Redis select DB($current) failed!");
            }
        }
    }
选择当前数据库

@throws CoreException