@@ -39,9 +39,11 @@ as the second and third parameters::
3939 // own lifetime, with a value 0 causing items to be stored indefinitely (i.e.
4040 // until RedisAdapter::clear() is invoked or the server(s) are purged)
4141 $defaultLifetime = 0,
42- // $marshaller (optional) MarshallerInterface instance to control serialization
43- // and deserialization of cache items. By default, it uses native PHP serialization.
44- // Useful to compress data, use custom serialization, or optimize the size and performance of cached items.
42+
43+ // $marshaller (optional) An instance of MarshallerInterface to control the serialization
44+ // and deserialization of cache items. By default, native PHP serialization is used.
45+ // This can be useful for compressing data, applying custom serialization logic, or
46+ // optimizing the size and performance of cached items
4547 ?MarshallerInterface $marshaller = null
4648 );
4749
@@ -275,6 +277,7 @@ Working with Marshaller
275277
276278TagAwareMarshaller for Tag-Based Caching
277279~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280+
278281Optimizes caching for tag-based retrieval, allowing efficient management of related items::
279282
280283 $marshaller = new TagAwareMarshaller();
@@ -287,7 +290,8 @@ Optimizes caching for tag-based retrieval, allowing efficient management of rela
287290
288291SodiumMarshaller for Encrypted Caching
289292~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290- Encrypts cached data with Sodium for added security::
293+
294+ Encrypts cached data using Sodium for enhanced security::
291295
292296 $encryptionKeys = [sodium_crypto_box_keypair()];
293297 $marshaller = new SodiumMarshaller($encryptionKeys);
@@ -300,7 +304,8 @@ Encrypts cached data with Sodium for added security::
300304
301305DefaultMarshaller with igbinary Serialization
302306~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
303- Uses igbinary for faster, more efficient serialization when available::
307+
308+ Uses ``igbinary` for faster and more efficient serialization when available ::
304309
305310 $marshaller = new DefaultMarshaller(true);
306311
@@ -312,7 +317,8 @@ Uses igbinary for faster, more efficient serialization when available::
312317
313318DefaultMarshaller with Exception on Failure
314319~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315- Throws an exception if serialization fails, aiding in error handling::
320+
321+ Throws an exception if serialization fails, facilitating error handling::
316322
317323 $marshaller = new DefaultMarshaller(false, true);
318324
@@ -323,12 +329,13 @@ Throws an exception if serialization fails, aiding in error handling::
323329 $item->set('data');
324330 $cache->save($item);
325331 } catch (\ValueError $e) {
326- echo 'Serialization failed: ' . $e->getMessage();
332+ echo 'Serialization failed: '. $e->getMessage();
327333 }
328334
329335SodiumMarshaller with Key Rotation
330336~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
331- Supports key rotation, allowing secure decryption with both old and new keys::
337+
338+ Supports key rotation, ensuring secure decryption with both old and new keys::
332339
333340 $keys = [sodium_crypto_box_keypair(), sodium_crypto_box_keypair()];
334341 $marshaller = new SodiumMarshaller($keys);
0 commit comments