Skip to content
Snippets Groups Projects
Commit 8f999ce2 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(pages): add locale to page cache

parent 8721719c
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,9 @@ class PageController extends BaseController
public function index(): string
{
$cacheName = "page-{$this->page->slug}";
$locale = service('request')
->getLocale();
$cacheName = "page-{$this->page->slug}-{$locale}";
if (! ($found = cache($cacheName))) {
$data = [
'metatags' => get_page_metatags($this->page),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment