Skip to content

Commit 5b3b07f

Browse files
committed
[Cache] update docs about encryption using SodiumMarshaller
1 parent 34c66f2 commit 5b3b07f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cache.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,19 @@ Clear all caches everywhere:
718718
Encrypting the Cache
719719
--------------------
720720

721+
.. versionadded:: 5.1
722+
723+
:class:`Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller` has been
724+
introduced in Symfony 5.1.
725+
721726
To encrypt the cache using ``libsodium``, you can use the
722727
:class:`Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller`.
723728

729+
.. note::
730+
731+
This will encrypt the values of the cache items, but not the cache keys. Be
732+
careful not the leak sensitive data in the keys.
733+
724734
Generate a key:
725735

726736
.. code-block:: terminal
@@ -828,5 +838,5 @@ for reading and writing, and the additional key(s) will only be used for reading
828838
->addArgument(['env(base64:CACHE_DECRYPTION_KEY)', 'env(base64:OLD_CACHE_DECRYPTION_KEY)'])
829839
->addArgument(service('@Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner'));
830840
831-
Once all cache entries encrypted with the old key have expired, you can remove
841+
Once all cache items encrypted with the old key have expired, you can remove
832842
`OLD_CACHE_DECRYPTION_KEY` completely.

0 commit comments

Comments
 (0)