Skip to content

Commit edf2010

Browse files
committed
[Cache] Adding about marshallers
1 parent 4865b3b commit edf2010

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/cache.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,18 @@ Now you can create, retrieve, update and delete items using this cache pool::
192192

193193
For a list of all of the supported adapters, see :doc:`/components/cache/cache_pools`.
194194

195+
Serializing Data
196+
----------------
197+
198+
When an item is stored in the cache, it is serialised to a string. It a class implementing
199+
:class:`Symfony\\Component\\Cache\\Marshaller\\MarshallerInterface` that is responsible
200+
for serializing and unserializing. Or to be technically correct: To ``marshall()``
201+
and to ``unmarshall()``.
202+
203+
The :class:`Symfony\\Component\\Cache\\Marshaller\\DefaultMarshaller` is using PHP's
204+
``serialize()`` or ``igbinary_serialize()`` if the Igbinary extension is installed.
205+
There are other marshallers that will encrypt or compress the data before storing it.
206+
195207
Advanced Usage
196208
--------------
197209

0 commit comments

Comments
 (0)