Skip to content

Commit 9317409

Browse files
committed
minor #15962 Use s-maxage instead of max-age for ESI (SerheyDolgushev)
This PR was merged into the 5.3 branch. Discussion ---------- Use `s-maxage` instead of `max-age` for ESI Seems like there is no reason to use `max-age` header for ESI blocks (https://book.varnish-software.com/4.0/chapters/VCL_Basics.html#the-initial-value-of-beresp-ttl). So similarly to https://github.com/SerheyDolgushev/symfony-docs/blame/5.3/http_cache/ssi.rst#L108 it should use `s-maxage`. Commits ------- 618c0bc Use s-maxage instead of max-age for ESI
2 parents 90936ab + 618c0bc commit 9317409

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

http_cache/esi.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ of the main page::
174174
{
175175
public function latest($maxPerPage)
176176
{
177-
// ...
178-
$response->setPublic();
179-
$response->setMaxAge(60);
177+
// sets to public and adds some expiration
178+
$response->setSharedMaxAge(60);
180179

181180
return $response;
182181
}

0 commit comments

Comments
 (0)