Problem/Motivation

Currently MaxAgeCheck doesn't handle when http_cache_control module is enabled and overrides cache.page.max_age.

Proposed resolution

Extend the current check to cover http_cache_control.

Remaining tasks

Add related code changes to MaxAgeCheck class.

Issue fork purge-3424019

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

junkuncz created an issue. See original summary.

junkuncz’s picture

Assigned: junkuncz » Unassigned
Status: Active » Needs review
junkuncz’s picture

Issue summary: View changes
roderik’s picture

Status: Needs review » Reviewed & tested by the community

Code looks good to me.

Approach looks good to me: as far as I understand, Purge is explicitly meant to cover "shared caches", so whenever s-maxage header is present it can ignore cache.page.max_age.

Tested: warning disappears from the status report when it shouldn't be there.

The change in logic isn't big so I don't think this needs test coverage?

japerry’s picture

Status: Reviewed & tested by the community » Needs review

Hmm I think a more elegant option here would be to throw an event, allowing the max_age variable to be changed. What if other modules have opinions here?

o'briat’s picture