Check this out.
You can override the default profiler.storage
service, which is defined here.
You could either define your own class (implementing the ProfilerStorageInterface) or use one of the provided implementations (check here for the whole list).
For example if you want to use the MongoDbProfilerStorage you can redefine the 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 wouldn't delete profiler data whenever you clear the cache.