response = $response; $event->stopped = true; } #[AsListener(RequestEvent::class, 99)] public function doCache(RequestEvent $event): void { if ($event->response === null) { return; } $path = md5($event->request->getPathInfo()); apcu_add($path, serialize($event->response)); } }