Skip to content

Conversation

@dwightwatson
Copy link
Contributor

I've been playing with the cache.headers middleware and exploring s-maxage and stale-while-revalidate directives.

While the paragraph above does spell out that Directives should be provided using the "snake case" equivalent of the corresponding cache-control directive, I still missed the subtle difference of hyphen placement between max-age and s-maxage and was running into exceptions like Response does not support the following options: "smax_age"..

I thought it might improve discoverability to include these common directives in the example. If you're exploring how to use cache headers you should be familiar with the options. I know this would have helped me.

@taylorotwell taylorotwell merged commit 0cddb90 into laravel:12.x Dec 17, 2025
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 this pull request may close these issues.

2 participants