public function logout()
    {
        $mySession = $this->getSession();
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        $oUser->logout();

        // kill session
        $mySession->destroy();

        //resetting content cache if needed
        if ($myConfig->getConfigParam('blClearCacheOnLogout')) {
            $this->resetContentCache(true);
        }

        \OxidEsales\Eshop\Core\Registry::getUtils()->redirect('index.php', true, 302);
    }