Skip to content

Commit f5b18ff

Browse files
committed
Improved introduction with explanation and motivation
1 parent 9997b0f commit f5b18ff

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ WebfactoryHttpCacheBundle is a Symfony bundle that eases
55

66
It provides the ```ReplaceWithNotModifiedResponse``` annotation for your controller actions. This annotation can be
77
parameterised 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

0 commit comments

Comments
 (0)