diff --git a/src/Controller/PageController.php b/src/Controller/PageController.php index 7325702..8d25f25 100644 --- a/src/Controller/PageController.php +++ b/src/Controller/PageController.php @@ -35,7 +35,7 @@ public function pageRoute(string $url, PageRepository $pageRepository, CacheInte // !@note the match comes without the first slash, and in the database and cms the url with the first slash $url = '/'.$url; - $cacheKey = $url; + $cacheKey = urlencode($url); $pageContent = $pageCache->get($cacheKey, function (ItemInterface $item) use ($pageRepository, $url) { $item->expiresAfter(365 * 24 * 60 * 60); diff --git a/src/Controller/PageUpdateFromSheetController.php b/src/Controller/PageUpdateFromSheetController.php index 901faf5..361c838 100644 --- a/src/Controller/PageUpdateFromSheetController.php +++ b/src/Controller/PageUpdateFromSheetController.php @@ -75,7 +75,7 @@ public function pageUpdateFromSheet(Request $request, EntityManagerInterface $en $entityManager->persist($page); $entityManager->flush(); - $cacheKey = $url; + $cacheKey = urlencode($url); $pageCache->delete($cacheKey); return new Response('success', Response::HTTP_OK);