From bcc5634849b41f32b904c62ab0b6197b9b09ef2e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 08:53:45 +0100 Subject: [PATCH] Finished the rewording of the "profiler storage" article --- cookbook/profiler/storage.rst | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/cookbook/profiler/storage.rst b/cookbook/profiler/storage.rst index fc6d8e4da22..1ce0a51c6fd 100644 --- a/cookbook/profiler/storage.rst +++ b/cookbook/profiler/storage.rst @@ -4,6 +4,21 @@ Switching the Profiler Storage ============================== -By default the profile stores the collected data in files in the ``%kernel.cache_dir%/profiler/`` directory. -You can control the storage by implementing the ``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` in -your own service and override the ``profiler.storage`` service. +In Symfony versions previous to 2.8, profiles could be stored in files, databases, +services like Redis and Memcache, etc. Starting from Symfony 2.8, the only storage +mechanism with built-in support is the filesystem. + +By default the profile stores the collected data in the ``%kernel.cache_dir%/profiler/`` +directory. If you want to use another location to store the profiles, define the +``dsn`` option of the ``framework.profiler``: + +.. code-block:: yaml + + # app/config/config.yml + framework: + profiler: + dsn: 'file:/tmp/symfony/profiler' + +You can also create your own profile storage service implementing the +:class:``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` and +overriding the ``profiler.storage`` service.