Question
How to set page cache expires to 7 days?
I am using varnish with default magento 2.3.3 VCL and the default nginx configuration that comes with magento install. At present I see the expires is set to -1. How can I set expires to one week?
status: 200
content-length: 22478
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
content-encoding: gzip
accept-ranges: bytes
access-control-expose-headers: Content-Length, Content-Range
vary: Accept-Encoding
expires: -1
server: nginx
strict-transport-security: max-age=31536000
pragma: no-cache
cache-control: no-store, no-cache, must-revalidate, max-age=0
date: Mon, 04 Jan 2020 15:04:45 GMT
x-frame-options: SAMEORIGIN
access-control-allow-headers: DNT,User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range
content-type: text/html; charset=UTF-8
access-control-allow-origin: *
access-control-allow-methods: GET, POST, OPTIONS
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Magento nginx conf file