diff --git a/src/Entries/EntryRepository.php b/src/Entries/EntryRepository.php index 8f2a14dc..2d1c5203 100644 --- a/src/Entries/EntryRepository.php +++ b/src/Entries/EntryRepository.php @@ -35,7 +35,7 @@ public function find($id): ?EntryContract public function findByUri(string $uri, string $site = null): ?EntryContract { - $blinkKey = "eloquent-entry-{$uri}".($site ? '-'.$site : ''); + $blinkKey = 'eloquent-entry-'.md5(urlencode($uri)).($site ? '-'.$site : ''); $item = Blink::once($blinkKey, function () use ($uri, $site) { return parent::findByUri($uri, $site); }); diff --git a/src/Taxonomies/TermRepository.php b/src/Taxonomies/TermRepository.php index 487e6a5c..ccd3557c 100644 --- a/src/Taxonomies/TermRepository.php +++ b/src/Taxonomies/TermRepository.php @@ -73,7 +73,7 @@ public function findByUri(string $uri, string $site = null): ?TermContract return null; } - $blinkKey = "eloquent-term-{$uri}".($site ? '-'.$site : ''); + $blinkKey = 'eloquent-term-'.md5(urlencode($uri)).($site ? '-'.$site : ''); $term = Blink::once($blinkKey, function () use ($slug, $taxonomy) { return $this->query() ->where('slug', $slug)