Dynamic Page Cache respects max-age. Internal Page Cache and the Cache-Control header your CDN reads don't. Here's how to keep Dynamic Page Cache working and give pages a real lifetime.
Did you know max-age doesn't make it out of Drupal?
A page's max-age usually isn't set on purpose. An access check returns a result marked uncacheable. A block's getCacheMaxAge() returns 0 . A view uses time-based caching set to one hour. Each of those bubbles up and lowers the max-age of the whole response.
Dynamic Page Cache respects that. Then it stops. Internal Page Cache ignores it, and so does the Cache-Control header your CDN or reverse proxy reads. Every cacheable page leaves Drupal with the same lifetime, whatever its content declared.
Know which caches ignore it
A response can be cached in three places after Drupal builds it. Only one of them respects max-age .
Dynamic Page Cache caches the page for every user, with personalized parts left as placeholders. It respects max-age .…