public function getIndexSchema($name, $refresh = false)
    {
        if (isset($this->_indexes[$name]) && !$refresh) {
            return $this->_indexes[$name];
        }

        $db = $this->db;
        $realName = $this->getRawIndexName($name);

        if ($db->enableSchemaCache && !in_array($name, $db->schemaCacheExclude, true)) {
            /* @var $cache Cache */
            $cache = is_string($db->schemaCache) ? Yii::$app->get($db->schemaCache, false) : $db->schemaCache;
            if ($cache instanceof Cache) {
                $key = $this->getCacheKey($name);
                if ($refresh || ($index = $cache->get($key)) === false) {
                    $index = $this->loadIndexSchema($realName);
                    if ($index !== null) {
                        $cache->set($key, $index, $db->schemaCacheDuration, new TagDependency([
                            'tags' => $this->getCacheTag(),
                        ]));
                    }
                }

                return $this->_indexes[$name] = $index;
            }
        }

        return $this->_indexes[$name] = $this->loadIndexSchema($realName);
    }