File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -208,16 +208,27 @@ Symfony uses *marshallers* (classes which implement
208208the cache items before storing them.
209209
210210The :class: `Symfony\\ Component\\ Cache\\ Marshaller\\ DefaultMarshaller ` uses PHP's
211- ``serialize() `` or ``igbinary_serialize() `` if the ` Igbinary extension `_ is installed.
212- There are other * marshallers * that can encrypt or compress the data before storing it: :
211+ ``serialize() `` function by default, but you can optionally use the ``igbinary_serialize() ``
212+ function from the ` Igbinary extension `_ :
213213
214214 use Symfony\C omponent\C ache\A dapter\R edisAdapter;
215215 use Symfony\C omponent\C ache\D efaultMarshaller;
216216 use Symfony\C omponent\C ache\D eflateMarshaller;
217217
218218 $marshaller = new DeflateMarshaller(new DefaultMarshaller());
219+ // you can optionally use the Igbinary extension if you have it installed
220+ // $marshaller = new DeflateMarshaller(new DefaultMarshaller(useIgbinarySerialize: true));
221+
219222 $cache = new RedisAdapter(new \R edis(), 'namespace', 0, $marshaller);
220223
224+ There are other *marshallers * that can encrypt or compress the data before storing it.
225+
226+ .. versionadded :: 7.2
227+
228+ In Symfony versions prior to 7.2, the ``igbinary_serialize() `` function was
229+ used by default when the Igbinary extension was installed. Starting from
230+ Symfony 7.2, you have to enable Igbinary support explicitly.
231+
221232Advanced Usage
222233--------------
223234
You can’t perform that action at this time.
0 commit comments