persistCache = $this->container->get(PersistCache::class); $this->persistCache->boot(); } public function terminate(Request $request, Response $response): void { $this->persistCache->persist(); parent::terminate($request, $response); } }