Skip to content
Closed
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
15 changes: 7 additions & 8 deletions serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,10 @@ stored in one of the following locations:
Enabling the Metadata Cache
---------------------------

Metadata used by the Serializer component such as groups can be cached to
enhance application performance. Any service implementing the ``Doctrine\Common\Cache\Cache``
interface can be used.

A service leveraging `APCu`_ (and APC for PHP < 5.5) is built-in.
Metadata used by the serializer can be cached to improve application performance.
By default, Symfony uses the same `APCu`_ (or APC for PHP < 5.5) cache already
configured in the application, but you can override it using any other service
implementing the ``Doctrine\Common\Cache\Cache`` interface:

.. configuration-block::

Expand All @@ -223,7 +222,7 @@ A service leveraging `APCu`_ (and APC for PHP < 5.5) is built-in.
framework:
# ...
serializer:
cache: serializer.mapping.cache.apc
cache: id.of.my.own.cache.service
Copy link
Member

Choose a reason for hiding this comment

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

Instead of using the framework.serializer.cache option we should explain to configure the cache.serializer (which defaults to cache.system) service through the framework.cache.pools option.


.. code-block:: xml

Expand All @@ -239,7 +238,7 @@ A service leveraging `APCu`_ (and APC for PHP < 5.5) is built-in.

<framework:config>
<!-- ... -->
<framework:serializer cache="serializer.mapping.cache.apc" />
<framework:serializer cache="id.of.my.own.cache.service" />
</framework:config>
</container>

Expand All @@ -249,7 +248,7 @@ A service leveraging `APCu`_ (and APC for PHP < 5.5) is built-in.
$container->loadFromExtension('framework', array(
// ...
'serializer' => array(
'cache' => 'serializer.mapping.cache.apc',
'cache' => 'id.of.my.own.cache.service',
),
));

Expand Down