Commit 8f999ce2 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(pages): add locale to page cache

parent 8721719c
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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),