public function getPath($userId, $permissionName, $params = [], $allowCaching = true)
    {
        if ($allowCaching && empty($params) && isset($this->paths[$userId][$permissionName])) {
            return $this->paths[$userId][$permissionName];
        }
        $this->checkAccess($userId, $permissionName, $params);
        if ($allowCaching && empty($params)) {
            $this->paths[$userId][$permissionName] = $this->currentPath;
        }
        return $this->currentPath;
    }