File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ WebfactoryHttpCacheBundle is a Symfony bundle that eases
55
66It provides the ``` ReplaceWithNotModifiedResponse ``` annotation for your controller actions. This annotation can be
77parameterised with Voters, one for each of the underlying ressources that overall determine the last modified date for
8- the response. By extracting the "last modified date of a ressource" parts into small, reusable Voters, it helps to keep
9- the controller clean and redundance-free. Compare for yourself a controller handling all by itself:
8+ the response. If the client request contains an appropriate if-not-modified-since header, the execution of the
9+ controller action will be skipped and an empty response with a 304 Not Modified status code will be sent. If your Voters
10+ are fast, this can improve your performance greatly.
11+
12+ By encouraging to extract the "last modified date of a ressource" parts into small, reusable Voters, the bundle helps to
13+ keep controllers clean and redundance-free. Compare for yourself a controller taking care of a 304 Not Modified response
14+ by itself:
1015
1116``` php
1217<?php
You can’t perform that action at this time.
0 commit comments