I have a production website for quite a long time now. By digging, we found that the Cache-Control was always to "no-cache" and "X-Drupal-Dynamic-Cache" is UNCACHEABLE
My settings.prod.php look like this
# ================================================================
# Performance settings
# ================================================================
$config['system.logging']['error_level'] = ERROR_REPORTING_HIDE;
$config['system.performance']['cache']['page']['max_age'] = 86400;
$config['system.performance']['css']['preprocess'] = TRUE;
$config['system.performance']['css']['gzip'] = TRUE;
$config['system.performance']['js']['preprocess'] = TRUE;
$config['system.performance']['js']['gzip'] = TRUE;
And this is my services.prod.yml
parameters:
http.response.debug_cacheability_headers: false
twig.config:
debug: false
auto_reload: false
cache: true
I have both dynamic_page_cache
and page_cache
enable on the website, because we have both anonymous and logged users.
Furthermore, the config settings is not display in the backend System > Development > Performance
, is the cache really activated like this ?