File tree 1 file changed +13
-2
lines changed
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
208
208
the cache items before storing them.
209
209
210
210
The :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 `_ :
213
213
214
214
use Symfony\C omponent\C ache\A dapter\R edisAdapter;
215
215
use Symfony\C omponent\C ache\D efaultMarshaller;
216
216
use Symfony\C omponent\C ache\D eflateMarshaller;
217
217
218
218
$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
+
219
222
$cache = new RedisAdapter(new \R edis(), 'namespace', 0, $marshaller);
220
223
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
+
221
232
Advanced Usage
222
233
--------------
223
234
You can’t perform that action at this time.
0 commit comments