Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValidationEvent is not dispatched if database cache is disabled #24

Closed
DieterHolvoet opened this issue Oct 16, 2023 · 0 comments · Fixed by #25
Closed

ValidationEvent is not dispatched if database cache is disabled #24

DieterHolvoet opened this issue Oct 16, 2023 · 0 comments · Fixed by #25
Assignees

Comments

@DieterHolvoet
Copy link
Contributor

If database cache is disabled, no ValidationEvent is dispatched because of an early return in Drupal\wmpage_cache\Validation\Validation::shouldIgnoreResponse:

// Don't even go through the motion if we are basically disabled
if (!$this->storeResponse && !$this->storeTags) {
    // Neutral because the page might be cacheable, we just don't care.
    return new CacheableResponseResult(AccessResult::neutral());
}

This isn't right though: the database cache is not used, but I'm still setting a max-age and s-max-age that should be unset if a user is logged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant