diff --git a/src/Services/PageRoutesService.php b/src/Services/PageRoutesService.php index ccc8ee7..929a855 100644 --- a/src/Services/PageRoutesService.php +++ b/src/Services/PageRoutesService.php @@ -171,8 +171,7 @@ protected function unsetOldUrlsOf(Page $page, array &$mapping) */ protected function replaceIdToUriMapping(array $mapping): void { - Cache::forget(static::ID_TO_URI_MAPPING); - Cache::rememberForever(static::ID_TO_URI_MAPPING, fn() => $mapping); + Cache::forever(static::ID_TO_URI_MAPPING, $mapping); } /** @@ -182,7 +181,6 @@ protected function replaceIdToUriMapping(array $mapping): void */ protected function replaceUriToIdMapping(array $mapping): void { - Cache::forget(static::URI_TO_ID_MAPPING); - Cache::rememberForever(static::URI_TO_ID_MAPPING, fn() => $mapping); + Cache::forever(static::URI_TO_ID_MAPPING, $mapping); } }