Mark this one out.
You can override the default profiler.storage
, which is defined here .
You can either define your own class (implementing ProfilerStorageInterface ), or use one of the provided implementations (check here for the entire list).
For example, if you want to use MongoDbProfilerStorage , you can override this service as follows:
<service id="profiler.storage" class="Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage" public="false"> <argument>mongodb://[USER: PWD@ ]HOST/DATABASE/COLLECTION</argument> <argument></argument> <argument></argument> <argument>86400</argument> </service>
This way, you do not delete profiler data every time you clear the cache.
source share