I am using Magento 2.3 with Redis. The problem was the navigation menu disappears when I enable full page cache. When I disable full page cache, the menu appears.
- full page cache enabled: menu disappears
- full page cache disabled: menu appears
app/etc/env.php
'cache' => [
'frontend' => [
'default' => [
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => '127.0.0.1',
'database' => '0',
'port' => '6379',
'password' => 'xxxx'
]
],
'page_cache' => [
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => '127.0.0.1',
'database' => '0',
'compress_data' => '0',
'password' => 'xxxx'
]
]
]
],
'session' => [
'save' => 'redis',
'redis' => [
'host' => '127.0.0.1',
'database' => '0',
'port' => '6379',
'password' => 'xxxx',
]
],
How can I fix this if I want enable full page caché ?
2
Answers
Solution
Go to Stores > Configuration > Advanced > System > Full page cache > Cache application > Choose "Built-in Cache"
Reason
The menu doesn't appear if
I removed the TTL attribute from /vendor/magento/module-theme/view/frontend/layout/default.xml and the menu bar was visible again. Hope it helps someone!