Skip to content

Commit 378d9e8

Browse files
committed
be keen to newcomers
1 parent 815bb7c commit 378d9e8

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

create_framework/http_kernel_httpkernelinterface.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ to cache a response for 10 seconds, use the ``Response::setTtl()`` method::
9090

9191
.. tip::
9292

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-
easily 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
95+
Response instances by dumping their string representation (``echo $response;``)
96+
as it displays all headers as well as the response content.
9897

9998
To validate that it works correctly, add a random number to the response
10099
content and check that the number only changes every 10 seconds::
@@ -114,8 +113,8 @@ comfortable with these concepts, read the `HTTP caching`_ chapter of the
114113
Symfony documentation.
115114

116115
The Response class contains many other methods that let you configure the
117-
HTTP cache very easily. One of the most powerful is ``setCache()`` as it
118-
abstracts the most frequently used caching strategies into one simple array::
116+
HTTP cache. One of the most powerful is ``setCache()`` as it abstracts the
117+
most frequently used caching strategies into one array::
119118

120119
$date = date_create_from_format('Y-m-d H:i:s', '2005-10-15 10:00:00');
121120

@@ -135,8 +134,8 @@ abstracts the most frequently used caching strategies into one simple array::
135134
$response->setSharedMaxAge(10);
136135

137136
When using the validation model, the ``isNotModified()`` method allows you to
138-
easily 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
138+
as possible::
140139

141140
$response->setETag('whatever_you_compute_as_an_etag');
142141

forms.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ That's it! Just three lines are needed to render the complete form:
178178

179179
.. seealso::
180180

181-
As easy as this is, it's not very flexible (yet). Usually, you'll want to
181+
As short as this is, it's not very flexible (yet). Usually, you'll want to
182182
render each form field individually so you can control how the form looks.
183183
You'll learn how to do that in the ":doc:`/form/rendering`" section.
184184

@@ -611,9 +611,9 @@ be used to quickly build a form object in the controller::
611611
// ...
612612
}
613613

614-
Placing the form logic into its own class means that the form can be easily
615-
reused elsewhere in your project. This is the best way to create forms, but
616-
the choice is ultimately up to you.
614+
Placing the form logic into its own class means that the form can be reused
615+
elsewhere in your project. This is the best way to create forms, but the
616+
choice is ultimately up to you.
617617

618618
.. _form-data-class:
619619

http_cache/esi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,6 @@ The ``render_esi`` helper supports two other useful options:
250250
``ignore_errors``
251251
If set to true, an ``onerror`` attribute will be added to the ESI with a value
252252
of ``continue`` indicating that, in the event of a failure, the gateway cache
253-
will simply remove the ESI tag silently.
253+
will remove the ESI tag silently.
254254

255255
.. _`ESI`: http://www.w3.org/TR/esi-lang

http_cache/expiration.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ HTTP headers: ``Expires`` or ``Cache-Control``.
1515
.. sidebar:: Expiration and Validation
1616

1717
You can of course use both validation and expiration within the same ``Response``.
18-
As expiration wins over validation, you can easily benefit from the best of
19-
both worlds. In other words, by using both expiration and validation, you
20-
can instruct the cache to serve the cached content, while checking back
21-
at some interval (the expiration) to verify that the content is still valid.
18+
As expiration wins over validation, you can benefit from the best of both worlds.
19+
In other words, by using both expiration and validation, you can instruct the cache
20+
to serve the cached content, while checking back at some interval (the expiration)
21+
to verify that the content is still valid.
2222

2323
.. tip::
2424

http_cache/validation.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ page again (see below for an implementation example).
2323

2424
The 304 status code means "Not Modified". It's important because with
2525
this status code the response does *not* contain the actual content being
26-
requested. Instead, the response is simply a light-weight set of directions that
26+
requested. Instead, the response is a light-weight set of directions that
2727
tells the cache that it should use its stored version.
2828

2929
Like with expiration, there are two different HTTP headers that can be used
@@ -32,10 +32,10 @@ to implement the validation model: ``ETag`` and ``Last-Modified``.
3232
.. sidebar:: Expiration and Validation
3333

3434
You can of course use both validation and expiration within the same ``Response``.
35-
As expiration wins over validation, you can easily benefit from the best of
36-
both worlds. In other words, by using both expiration and validation, you
37-
can instruct the cache to serve the cached content, while checking back
38-
at some interval (the expiration) to verify that the content is still valid.
35+
As expiration wins over validation, you can benefit from the best of both worlds.
36+
In other words, by using both expiration and validation, you can instruct the cache
37+
to serve the cached content, while checking back at some interval (the expiration)
38+
to verify that the content is still valid.
3939

4040
.. tip::
4141

0 commit comments

Comments
 (0)