Skip to content

Conversation

@lacatoire
Copy link
Contributor

This PR documents the ability to use PHP closures with the #[Cache] attribute
to compute the Last-Modified and ETag HTTP headers.

Closures can be used as an alternative to expressions and receive the resolved
controller arguments and the current Request object.

The documentation includes examples based on controller arguments and request
attributes, and clarifies that headers already set on the Response are not
overridden.

Issue #21678

@carsonbot carsonbot added this to the 8.1 milestone Jan 9, 2026
@lacatoire lacatoire force-pushed the document-cache-attribute-closures branch from 918a928 to d8bc547 Compare February 10, 2026 11:18
@lacatoire lacatoire force-pushed the document-cache-attribute-closures branch from 44785a0 to abdba3e Compare February 10, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants