Skip to content

Commit 39999a6

Browse files
authored
Merge pull request #498 from FriendsOfSymfony/xkey-ykey-doc
when available, ykey is preferred over xkey
2 parents 6dcfc42 + e1b6f43 commit 39999a6

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

doc/varnish-configuration.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,14 @@ Tag Invalidation Using xkey
183183
Since Varnish 4.1, you can use the official `xkey Varnish module`_ for better
184184
performance with cache tags.
185185

186+
.. tip::
187+
188+
If you are using the payed "Varnish Plus" offering, you should use the
189+
improved ykey feature instead of xkey. The `ykey documentation`_ explains
190+
how to use the xkey headers to set up the ykey information. Instead of
191+
including the ``fos_tags_xkey.vcl`` you would need to write your own VCL to
192+
handle ykey tagging and invalidation requests.
193+
186194
As explained in the `Cache Invalidation chapter of the Varnish documentation`_::
187195
> (..), ``hashtwo``/``xkey`` is much more efficient than bans because of two reasons:
188196
> 1) looking up hash keys is much more efficient than traversing ban-lists, and
@@ -192,13 +200,10 @@ As explained in the `Cache Invalidation chapter of the Varnish documentation`_::
192200
With xkey, you can also soft purge tagged responses to allow for a grace period
193201
where invalidated (stale) content is still delivered to the client.
194202

195-
Minimum version of `varnish-modules` is v0.10.2*. It's part of Ubuntu 17.10
196-
("Artful") and higher, otherwise see their documentation for
197-
`installing xkey on other platforms`_. You can technically use earlier versions
198-
of the varnish modules down to 0.9.x releases. However, v0.10.2 is the first
199-
version introducing support for purging several tags at once. If you use an
200-
older version, you need to invalidate only one tag at a time, and can't use
201-
soft purge.
203+
Install the varnish modules with your distribution if available, or refer to the
204+
Varnish documentation for `installing xkey`_. Version 0.10.2 is the first version
205+
to support purging more than one tag at once. With older versions you can only
206+
invalidate one tag at a time, and soft purge is not available.
202207

203208
To use ``xkey``, :ref:`configure the Varnish Client for xkey <varnish_custom_tags_header>`
204209
and :ref:`the response tagger to use the xkey header <response_tagger_optional_parameters>`,
@@ -462,7 +467,8 @@ To enable this feature, add the following to ``your_varnish.vcl``:
462467
.. _explained in the Varnish documentation: https://www.varnish-cache.org/trac/wiki/VCLExampleRemovingSomeCookies#RemovingallBUTsomecookies
463468
.. _curl Varnish plugin: https://github.com/varnish/libvmod-curl
464469
.. _xkey Varnish module: https://github.com/varnish/varnish-modules/blob/master/docs/vmod_xkey.rst
470+
.. _ykey documentation: https://docs.varnish-software.com/varnish-cache-plus/vmods/ykey/
465471
.. _Cache Invalidation chapter of the Varnish documentation: http://book.varnish-software.com/4.0/chapters/Cache_Invalidation.html#hashtwo-xkey-varnish-software-implementation-of-surrogate-keys
466-
.. _installing xkey on other platforms: https://github.com/varnish/varnish-modules#installation
472+
.. _installing xkey: https://github.com/varnish/varnish-modules#installation
467473
.. _`builtin VCL`: https://github.com/varnishcache/varnish-cache/blob/5.0/bin/varnishd/builtin.vcl
468474
.. _`default VCL`: https://github.com/varnishcache/varnish-cache/blob/3.0/bin/varnishd/default.vcl

0 commit comments

Comments
 (0)