protected function getCachePath($file, $type): array
    {
        $hash = md5($file . $type);
        if (isset($this->config[$type])) {
            $isTransparent = ArrayHelper::getValue($this->config[$type], 'transparent', false);
        } else {
            $isTransparent = false;
        }

        $cacheFileExt = $isTransparent ? self::TRANSPARENT_EXTENSION : strtolower(pathinfo($file, PATHINFO_EXTENSION));
        $cachePath = $this->cachePath . $hash[0] . DIRECTORY_SEPARATOR;
        $cachePublicPath = $this->cachePublicPath . $hash[0] . DIRECTORY_SEPARATOR;
        $cacheFile = "{$hash}.{$cacheFileExt}";
        $systemPath = Yii::getAlias('@app') . $cachePath;

        FileHelper::createDirectory($systemPath);

        return [
            'system' => $systemPath . $cacheFile,
            'web' => $cachePath . $cacheFile,
            'public' => $cachePublicPath . $cacheFile,
            'extension' => $cacheFileExt,
        ];
    }