Skip to content

Commit 0cddb90

Browse files
authored
Adjust example to show how other common directives can be used (#10952)
1 parent da854c6 commit 0cddb90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

responses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ return response($content)
102102
Laravel includes a `cache.headers` middleware, which may be used to quickly set the `Cache-Control` header for a group of routes. Directives should be provided using the "snake case" equivalent of the corresponding cache-control directive and should be separated by a semicolon. If `etag` is specified in the list of directives, an MD5 hash of the response content will automatically be set as the ETag identifier:
103103

104104
```php
105-
Route::middleware('cache.headers:public;max_age=2628000;etag')->group(function () {
105+
Route::middleware('cache.headers:public;max_age=30;s_maxage=300;stale_while_revalidate=600;etag')->group(function () {
106106
Route::get('/privacy', function () {
107107
// ...
108108
});

0 commit comments

Comments
 (0)