@@ -90,11 +90,10 @@ to cache a response for 10 seconds, use the ``Response::setTtl()`` method::
90
90
91
91
.. tip ::
92
92
93
- If, like me, you are running your framework from the command line by
94
- simulating requests (``Request::create('/is_leap_year/2012') ``), you can
95
- debug Response instances by dumping their string representation
96
- (``echo $response; ``) as it displays all headers as well as the response
97
- content.
93
+ If you are running your framework from the command line by simulating
94
+ requests (``Request::create('/is_leap_year/2012') ``), you can debug Response
95
+ instances by dumping their string representation (``echo $response; ``) as it
96
+ displays all headers as well as the response content.
98
97
99
98
To validate that it works correctly, add a random number to the response
100
99
content and check that the number only changes every 10 seconds::
@@ -113,9 +112,9 @@ expiration and the validation models of the HTTP specification. If you are not
113
112
comfortable with these concepts, read the `HTTP caching `_ chapter of the
114
113
Symfony documentation.
115
114
116
- The Response class contains methods that let you configure the
117
- HTTP cache. One of the most powerful is ``setCache() `` as it
118
- abstracts the most frequently used caching strategies into a single array::
115
+ The Response class contains methods that let you configure the HTTP cache. One
116
+ of the most powerful is ``setCache() `` as it abstracts the most frequently used
117
+ caching strategies into a single array::
119
118
120
119
$date = date_create_from_format('Y-m-d H:i:s', '2005-10-15 10:00:00');
121
120
@@ -135,8 +134,8 @@ abstracts the most frequently used caching strategies into a single array::
135
134
$response->setSharedMaxAge(10);
136
135
137
136
When using the validation model, the ``isNotModified() `` method allows you to
138
- cut on the response time by short-circuiting the response generation as
139
- early as possible::
137
+ cut on the response time by short-circuiting the response generation as early as
138
+ possible::
140
139
141
140
$response->setETag('whatever_you_compute_as_an_etag');
142
141
0 commit comments