From e38f068e06d34125350e2b5568cbaea0b58b6f47 Mon Sep 17 00:00:00 2001 From: Gilbertsoft <25326036+gilbertsoft@users.noreply.github.com> Date: Thu, 21 Jul 2022 12:05:01 +0200 Subject: [PATCH] [BUFIX] Use unique cache keys in ReleasesController (#348) --- src/Controller/Api/MajorVersion/ReleasesController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/Api/MajorVersion/ReleasesController.php b/src/Controller/Api/MajorVersion/ReleasesController.php index 97e7a681..77ea374f 100644 --- a/src/Controller/Api/MajorVersion/ReleasesController.php +++ b/src/Controller/Api/MajorVersion/ReleasesController.php @@ -60,7 +60,7 @@ class ReleasesController extends AbstractController #[Route(path: '/', methods: ['GET'])] public function getReleasesByMajorVersion(string $version): JsonResponse { - $json = $this->getCache()->get('release-' . $version, function (ItemInterface $item) use ($version): string { + $json = $this->getCache()->get('releases-' . $version, function (ItemInterface $item) use ($version): string { $item->tag(['releases', 'release-' . $version]); $majorVersion = $this->findMajorVersion($version); @@ -96,7 +96,7 @@ public function getReleasesByMajorVersion(string $version): JsonResponse #[Route(path: '/latest', methods: ['GET'])] public function getLatestReleaseByMajorVersion(string $version): JsonResponse { - $json = $this->getCache()->get('release-' . $version, function (ItemInterface $item) use ($version): string { + $json = $this->getCache()->get('release-latest-' . $version, function (ItemInterface $item) use ($version): string { $item->tag(['releases', 'release-' . $version]); $majorVersion = $this->findMajorVersion($version); @@ -134,7 +134,7 @@ public function getLatestSecurityReleaseByMajorVersion(string $version): JsonRes { $this->checkMajorVersionFormat($version); - $json = $this->getCache()->get('release-' . $version, function (ItemInterface $item) use ($version): string { + $json = $this->getCache()->get('release-latest-security-' . $version, function (ItemInterface $item) use ($version): string { $item->tag(['releases', 'release-' . $version]); $release = $this->findLatestSecurityReleaseByMajorVersion($version); @@ -179,7 +179,7 @@ public function getLatestSecurityReleaseByMajorVersion(string $version): JsonRes #[Route(path: '/latest/content', methods: ['GET'])] public function getLatestReleaseContentByMajorVersion(string $version): JsonResponse { - $json = $this->getCache()->get('release-' . $version, function (ItemInterface $item) use ($version): string { + $json = $this->getCache()->get('release-latest-content-' . $version, function (ItemInterface $item) use ($version): string { $item->tag(['releases', 'release-' . $version]); $majorVersion = $this->findMajorVersion($version);