8000 Show Varnish 4 first · FriendsOfSymfony/FOSHttpCache@336d756 · GitHub
[go: up one dir, main page]

Skip to content

Commit 336d756

Browse files
committed
Show Varnish 4 first
1 parent 2f08817 commit 336d756

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

doc/varnish-configuration.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ to your Varnish configuration. This ACL determines which IPs are allowed to
1616
issue invalidation requests. Let’s call the ACL `invalidators`. The ACL below
1717
will be used throughout the Varnish examples on this page.
1818

19-
.. code-block:: c
19+
.. code-block:: varnish4
2020
2121
# /etc/varnish/your_varnish.vcl
2222
2323
acl invalidators {
24-
"localhost";
25-
# Add any other IP addresses that your application runs on and that you
26-
# want to allow invalidation requests from. For instance:
27-
# "192.168.1.0"/24;
24+
"localhost";
25+
# Add any other IP addresses that your application runs on and that you
26+
# want to allow invalidation requests from. For instance:
27+
# "192.168.1.0"/24;
2828
}
2929
3030
.. important::
@@ -42,14 +42,14 @@ Purge removes a specific URL (including query strings) in all its variants (as s
4242

4343
.. configuration-block::
4444

45-
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/purge.vcl
46-
:language: varnish3
47-
:linenos:
48-
4945
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/purge.vcl
5046
:language: varnish4
5147
:linenos:
5248

49+
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/purge.vcl
50+
:language: varnish3
51+
:linenos:
52+
5353
Refresh
5454
~~~~~~~
5555

@@ -69,13 +69,13 @@ To configure Varnish for `handling BAN requests <https://www.varnish-software.co
6969

7070
.. configuration-block::
7171

72-
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/ban.vcl
73-
:language: varnish3
72+
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/ban.vcl
73+
:language: varnish4
7474
:lines: 1-7, 15-18, 20-
7575
:linenos:
7676

77-
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/ban.vcl
78-
:language: varnish4
77+
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/ban.vcl
78+
:language: varnish3
7979
:lines: 1-7, 15-18, 20-
8080
:linenos:
8181

@@ -97,13 +97,13 @@ Add the following to your Varnish configuration to enable :ref:`cache tagging <t
9797

9898
.. configuration-block::
9999

100-
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/ban.vcl
101-
:language: varnish3
100+
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/ban.vcl
101+
:language: varnish4
102102
:emphasize-lines: 8-13
103103
:linenos:
104104

105-
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/ban.vcl
106-
:language: varnish4
105+
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/ban.vcl
106+
:language: varnish3
107107
:emphasize-lines: 8-13
108108
:linenos:
109109

@@ -117,14 +117,14 @@ to the ``recv`` and the ``deliver`` methods:
117117

118118
.. configuration-block::
119119

120-
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/user_context.vcl
121-
:language: varnish3
122-
:linenos:
123-
124120
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/user_context.vcl
125121
:language: varnish4
126122
:linenos:
127123

124+
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/user_context.vcl
125+
:language: varnish3
126+
:linenos:
127+
128128
.. sidebar:: Caching User Specific Content
129129

130130
By default, Varnish does not check for cached data as soon as the request
@@ -174,7 +174,7 @@ To make the hash request cacheable, you must extract a stable user session id.
174174
You can do this as
175175
`explained in the Varnish documentation <https://www.varnish-cache.org/trac/wiki/VCLExampleRemovingSomeCookies#RemovingallBUTsomecookies>`_:
176176

177-
.. code-block:: varnish3
177+
.. code-block:: varnish4
178178
:linenos:
179179
180180
sub vcl_recv {
@@ -203,13 +203,13 @@ Configure your Varnish to set a debug header that shows whether a cache hit or m
203203

204204
.. configuration-block::
205205

206-
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/debug.vcl
207-
:language: varnish3
208-
:linenos:
209-
210206
.. literalinclude:: ../tests/Functional/Fixtures/varnish-4/debug.vcl
211207
:language: varnish4
212208
:linenos:
213209

210+
.. literalinclude:: ../tests/Functional/Fixtures/varnish-3/debug.vcl
211+
:language: varnish3
212+
:linenos:
213+
214214
.. _`default VCL`: https://www.varnish-cache.org/trac/browser/bin/varnishd/default.vcl?rev=3.0#L63
215215

0 commit comments

Comments
 (0)
0