public function onKernelTerminate(PostResponseEvent $event)
    {
        if (!$event->getRequest()->hasSession()) {
            return;
        }

        $session = $event->getRequest()->getSession();

        $this->registry->refreshLastUsed($session->getId(), $session->getMetadataBag()->getLastUsed());
    }