Skip to content

Commit

Permalink
Finished the rewording of the "profiler storage" article
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Dec 30, 2015
1 parent 32a63d8 commit bcc5634
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions cookbook/profiler/storage.rst
Expand Up @@ -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.

0 comments on commit bcc5634

Please sign in to comment.