From ae4af81430e0cf0de04b771a20ef910bd01ab93c Mon Sep 17 00:00:00 2001 From: Hamza Date: Thu, 19 Feb 2026 21:45:30 +0100 Subject: [PATCH] fix(contactsIntegration): avoid incorrect cache results Signed-off-by: Hamza --- lib/Controller/ContactIntegrationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/ContactIntegrationController.php b/lib/Controller/ContactIntegrationController.php index 99b897b3c5..5fe9d5fc99 100644 --- a/lib/Controller/ContactIntegrationController.php +++ b/lib/Controller/ContactIntegrationController.php @@ -85,7 +85,7 @@ public function newContact(?string $contactName = null, ?string $mail = null): J */ #[TrapError] public function autoComplete(string $term): JSONResponse { - $cached = $this->cache->get($this->uid . $term); + $cached = $this->cache->get("{$this->uid}:$term"); if ($cached !== null) { $decoded = json_decode($cached, true); if ($decoded !== null) { @@ -93,7 +93,7 @@ public function autoComplete(string $term): JSONResponse { } } $res = $this->service->autoComplete($term); - $this->cache->set($this->uid . $term, json_encode($res), 24 * 3600); + $this->cache->set("{$this->uid}:$term", json_encode($res), 24 * 3600); return new JSONResponse($res); } }