Skip to content

Commit

Permalink
Fix cache update to make it more portable across drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
Voltra committed Dec 6, 2023
1 parent 0852c10 commit 809ff7e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Services/PageRoutesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -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);
}
}

0 comments on commit 809ff7e

Please sign in to comment.