diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
index 7d8bf5f0a03e1..406ed376b4ad0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
@@ -513,7 +513,7 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode)
->canBeEnabled()
->children()
->booleanNode('enable_annotations')->defaultFalse()->end()
- ->scalarNode('cache')->end()
+ ->scalarNode('cache')->defaultValue('serializer.mapping.cache.symfony')->end()
->scalarNode('name_converter')->end()
->end()
->end()
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
index 16e8fce463358..bc12894339b94 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -982,7 +982,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
$chainLoader->replaceArgument(0, $serializerLoaders);
- if (isset($config['cache']) && $config['cache']) {
+ if (!$container->getParameter('kernel.debug')) {
$container->setParameter(
'serializer.mapping.cache.prefix',
'serializer_'.$this->getKernelRootHash($container)
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml
index 7a567896a0dde..b79d9c0d39ff7 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache_pools.xml
@@ -25,6 +25,10 @@
+
+
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml
index 752588c37e7eb..e2ff4d7760a77 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml
@@ -38,6 +38,10 @@
+
+
+
+
%serializer.mapping.cache.prefix%
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
index b41d568c64fba..9ecc2df51dff5 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -221,6 +221,7 @@ protected static function getBundleDefaultConfig()
'serializer' => array(
'enabled' => false,
'enable_annotations' => false,
+ 'cache' => 'serializer.mapping.cache.symfony',
),
'property_access' => array(
'magic_call' => false,