Skip to content

update the serializer cache description #10039

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

Merged
merged 1 commit into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,8 @@ ships with multiple adapters: ``cache.adapter.apcu``, ``cache.adapter.doctrine``
given the adapter they are based on. Internally, a pool wraps the definition
of an adapter.

.. _reference-cache-systen:

system
......

Expand Down
45 changes: 3 additions & 42 deletions serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,48 +229,9 @@ 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.

.. configuration-block::

.. code-block:: yaml

# app/config/config_prod.yml
framework:
# ...
serializer:
cache: serializer.mapping.cache.apc

.. code-block:: xml

<!-- app/config/config_prod.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config>
<!-- ... -->
<framework:serializer cache="serializer.mapping.cache.apc" />
</framework:config>
</container>

.. code-block:: php

// app/config/config_prod.php
$container->loadFromExtension('framework', array(
// ...
'serializer' => array(
'cache' => 'serializer.mapping.cache.apc',
),
));
enhance application performance. By default, the serializer uses the ``cache.system``
cache pool which is configured using the :ref:`cache.system <reference-cache-systen>`
option.

Enabling a Name Converter
-------------------------
Expand Down