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