Skip to content

[Cache] Add marshaller #17153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 5.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions components/cache/adapters/apcu_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ memory, a component appreciably faster than many others, such as the filesystem.
this adapter.

The ApcuAdapter can optionally be provided a namespace, default cache lifetime,
and cache items version string as constructor arguments::
cache items version string and marshaller as constructor arguments::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should add reference to marshallers docs: https://symfony.com/doc/current/components/cache.html#marshalling-serializing-data

:ref:`marshaller <marshalling-serializing-data>`

components/cache.rst must also be updated from

Marshalling (Serializing) Data
------------------------------

to

.. _marshalling-serializing-data:

Marshalling (Serializing) Data
------------------------------


use Symfony\Component\Cache\Adapter\ApcuAdapter;

Expand All @@ -33,7 +33,10 @@ and cache items version string as constructor arguments::

// when set, all keys prefixed by $namespace can be invalidated by changing
// this $version string
$version = null
$version = null,

// marshaller (classe which implement MarshallerInterface) to process the cache items before storing them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// marshaller (classe which implement MarshallerInterface) to process the cache items before storing them
// marshaller (object implementing Symfony\Component\Cache\Marshaller\MarshallerInterface) to process the cache items before storing them

$marshaller = null
);

.. caution::
Expand Down