Skip to content

Commit da5dbb7

Browse files
authored
Merge pull request #327 from FriendsOfSymfony/docs
Fix some documentation issues
2 parents f2fbeb9 + 93ee5d6 commit da5dbb7

10 files changed

+35
-34
lines changed

doc/_static/fos.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
.versionmodified {
22
font-weight: bold;
33
}
4+
5+
span.pre {
6+
color: #404040;
7+
}

doc/cache-invalidator.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ Invalidating Paths and URLs
4545

4646
Invalidate a path::
4747

48-
$cacheInvalidator->invalidatePath('/users')
49-
->flush()
50-
;
48+
$cacheInvalidator->invalidatePath('/users')->flush();
5149

5250
See below for the :ref:`flush() <flush>` method.
5351

doc/contributing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Contributing
22
============
33

4-
We are happy for contributions. Before you invest a lot of time however, best
5-
open an issue on GitHub_ to discuss your idea. Then we can coordinate efforts
6-
if somebody is already working on the same thing.
4+
We warmly welcome contributions to FOSHttpCache. Before you invest a lot of time
5+
however, please open an issue on GitHub_ to discuss your idea. Then we can
6+
coordinate efforts if somebody is already working on the same thing.
77

88
Testing the Library
99
-------------------

doc/installation.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Getting started
44
Installation
55
------------
66

7-
The FOSHttpCache library is available on Packagist_. You can install it using
8-
Composer_.
7+
The FOSHttpCache library is available on Packagist_. You can install the library
8+
and its dependencies using Composer_.
99

1010
The library relies on HTTPlug_ for sending invalidation requests over HTTP, so
1111
you need to install an HTTPlug-compatible client or adapter first:
@@ -37,10 +37,7 @@ Then install the FOSHttpCache library itself:
3737
.. note::
3838

3939
This library follows `Semantic Versioning`_. Except for major versions, we
40-
aim to not introduce BC breaks in new releases. You should still test your
41-
application after upgrading though. What is a bug fix for somebody could
42-
break something for others when they where (probably unawares) relying on
43-
that bug.
40+
aim to not introduce BC breaks in new releases.
4441

4542
Configuration
4643
-------------

doc/nginx-configuration.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ features provided by this library. The examples are tested with NGINX version
88
1.4.6.
99

1010
NGINX cache is a set of key/value pairs. The key is built with elements taken from the requests
11-
(URI, cookies, http headers etc) as specified by `proxy_cache_key` directive.
11+
(URI, cookies, http headers etc) as specified by ``proxy_cache_key`` directive.
1212

1313
When we interact with the cache to purge/refresh entries we must send to NGINX a request which has
1414
the very same values, for the elements used for building the key, as the request that create the entry.
1515
In this way NGINX can build the correct key and apply the required operation to the entry.
1616

17-
By default NGINX key is built with `$scheme$proxy_host$request_uri`. For a full list of the elements
18-
you can use in the key see `this page from the official documentation <http://nginx.org/en/docs/http/ngx_http_core_module.html#variables>`_
17+
By default NGINX key is built with ``$scheme$proxy_host$request_uri``. For a full list of the elements
18+
you can use in the key see `this page from the official documentation <http://nginx.org/en/docs/http/ngx_http_core_module.html#variables>`_.
1919

2020
Purge
2121
~~~~~
2222

2323
NGINX does not support :term:`purge` functionality out of the box but you can easily add it with
2424
`ngx_cache_purge <https://github.com/FRiCKLE/ngx_cache_purge>`_ module. You just need to compile
25-
NGINX from sources adding `ngx_cache_purge` with `--add-module`
25+
NGINX from sources adding ``ngx_cache_purge`` with ``--add-module``.
2626

2727
You can check the script :source:`install-nginx.sh <tests/install-nginx.sh>` to get an idea
2828
about the steps you need to perform.
@@ -55,7 +55,7 @@ so add a line like the following to your config:
5555
Debugging
5656
~~~~~~~~~
5757

58-
Configure your Nginx to set a custom header (`X-Cache`) that shows whether a
58+
Configure your Nginx to set a custom header (``X-Cache``) that shows whether a
5959
cache hit or miss occurred:
6060

6161
.. code-block:: none

doc/proxy-clients.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ client suitable for the proxy server you use.
1616
Supported invalidation methods
1717
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1818

19-
Not all clients support all operations. This table provides an overview what
20-
each proxy client supports:
19+
Not all clients support all :ref:`invalidation methods <invalidation methods>`.
20+
This table provides of methods supported by each proxy client:
2121

2222
============= ======= ======= =======
2323
Client Purge Refresh Ban
@@ -35,7 +35,7 @@ Setup
3535
-----
3636

3737
Most proxy clients use the ``HttpDispatcher`` to send requests to the proxy
38-
server. The ``HttpDispatcher`` is built on top of the Httplug_ abstraction to
38+
server. The ``HttpDispatcher`` is built on top of the HTTPlug_ abstraction to
3939
be independent of specific HTTP client implementations.
4040

4141
.. _HTTP client configuration:
@@ -69,10 +69,10 @@ used. If you specify a custom HTTP client, you need to configure the client to
6969
convert HTTP error status into exceptions. This can either be done in a client
7070
specific way or with the HTTPlug ``PluginClient`` and the ``ErrorPlugin``.
7171
If client and/or URI factory are not specified, the dispatcher uses
72-
`Httplug discovery_` to find available implementations.
72+
`HTTPlug discovery`_ to find available implementations.
7373

74-
Learn more about available HTTP clients `in the Httplug documentation`_. To
75-
customize the behavior of the HTTP client, you can use `Httplug plugins`_.
74+
Learn more about available HTTP clients `in the HTTPlug documentation`_. To
75+
customize the behavior of the HTTP client, you can use `HTTPlug plugins`_.
7676

7777
.. _varnish client:
7878

@@ -104,7 +104,7 @@ You can also pass some options to the Varnish client:
104104
merged with the built-in headers.
105105

106106
Additionally, you can specify the request factory used to build the
107-
invalidation HTTP requests. If not specified, auto discovery is used - which
107+
invalidation HTTP requests. If not specified, auto discovery is used which
108108
usually is fine.
109109

110110
A full example could look like this::
@@ -175,7 +175,7 @@ The Multiplexer client allows multiple Proxy clients to be used during the stand
175175
cache invalidation, thus enabling multiple caches to be handled at once.
176176
It is useful when multiple caches exist in the environment and they need to be handled
177177
at the same time; the Multiplexer proxy client will forward the cache invalidation calls
178-
to all Proxy clients provided at creation time.::
178+
to all proxy clients provided at creation time::
179179

180180
use FOS\HttpCache\ProxyClient\MultiplexerClient;
181181
use FOS\HttpCache\ProxyClient\Nginx;
@@ -215,8 +215,8 @@ requests to the proxy server. This is on purpose: this way, we can send
215215
all requests together, reducing the performance impact of sending invalidation
216216
requests.
217217

218-
.. _Httplug: http://httplug.io/
219-
.. _Httplug discovery: http://php-http.readthedocs.io/en/latest/discovery.html
220-
.. _in the Httplug documentation: http://php-http.readthedocs.io/en/latest/clients.html
221-
.. _Httplug plugins: http://php-http.readthedocs.io/en/latest/plugins/index.html
218+
.. _HTTPlug: http://httplug.io/
219+
.. _HTTPlug discovery: http://php-http.readthedocs.io/en/latest/discovery.html
220+
.. _in the HTTPlug documentation: http://php-http.readthedocs.io/en/latest/clients.html
221+
.. _HTTPlug plugins: http://php-http.readthedocs.io/en/latest/plugins/index.html
222222
.. _message factory and URI factory: http://php-http.readthedocs.io/en/latest/message/message-factory.html

doc/proxy-configuration.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
Proxy Server Configuration
44
==========================
55

6-
You need to configure the proxy server of your choice. These guides help you
6+
You need to configure the proxy server of your choice (Varnish, NGINX or Symfony
7+
HttpCache) to work with FOSHttpCache. These guides help you
78
for the configuration for the features of this library. You will still need to
89
know about the other features of the proxy server to get everything right.
910

doc/symfony-cache-configuration.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Symfony HttpCache Configuration
44
-------------------------------
55

6-
The ``symfony/http-kernel`` component provides a reverse proxy implemented
6+
Symfony’s `HttpKernel`_ component provides a reverse proxy implemented
77
completely in PHP, called `HttpCache`_. While it is certainly less efficient
88
than using Varnish or NGINX, it can still provide considerable performance
99
gains over an installation that is not cached at all. It can be useful for
@@ -264,3 +264,4 @@ something went really wrong in the kernel. Have a look at ``X-Symfony-Cache``
264264
and at the HTML body of the response.
265265

266266
.. _HttpCache: http://symfony.com/doc/current/book/http_cache.html#symfony-reverse-proxy
267+
.. _HttpKernel: http://symfony.com/doc/current/components/http_kernel.html

doc/testing-your-application.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ to test both Varnish 3 and 4 on a continuous integration system). See the
143143
==================== ========================= ======= ===========================================
144144
Environment Variable Getter Default Description
145145
==================== ========================= ======= ===========================================
146-
``VARNISH_VERSION`` ``getVarnishVersion()`` ``4`` version of varnish application that is used
146+
``VARNISH_VERSION`` ``getVarnishVersion()`` ``4`` version of Varnish application that is used
147147
==================== ========================= ======= ===========================================
148148

149149
See ``tests/bootstrap.php`` for an example how this repository uses the version
@@ -224,7 +224,7 @@ CacheAssertions Trait
224224

225225
Provides cache hit/miss assertions to your tests. To enable the these
226226
``assertHit`` and ``assertMiss`` assertions, you need to configure your proxy
227-
server to set an `X-Cache` header with the cache status:
227+
server to set an ``X-Cache`` header with the cache status:
228228

229229
* :ref:`Varnish <varnish_debugging>`
230230
* :ref:`NGINX <nginx_debugging>`

doc/varnish-configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ simple ACL, valid for all Varnish versions from 3 onwards, looks as follows:
3333
trigger invalidation are whitelisted here. Otherwise, lost cache invalidation
3434
requests will lead to lots of confusion.
3535

36-
Provided Vcl Subroutines
36+
Provided VCL Subroutines
3737
~~~~~~~~~~~~~~~~~~~~~~~~
3838

3939
In order to ease configuration we provide a set of VCL subroutines in the

0 commit comments

Comments
 (0)