You are looking at the wrong part of the output. You are looking at the deep search for libraries that can not be cached so easily due to the fact that the stm32 writes out files to notify an extra library needs building. The core writes this file regardless of if it has changed or not. It is outside of your control. When you re-enabled deep search that would have caused the deep search to run.
In the case of stm32 they write out an include that automatically forces deep search to discover a library called SrcWrapper. You could add #include <SrcWrapper.h> to your ino code and switch off deep search but be warned that if any other library you use relies on deep search to discover other libraries you would need to ensure you have #included the other libraries in your .ino code. It is under your control but please dont let it cause support issues.
If you look further down the build output you will see that the ScrWrapper library is detected as already cached and is not rebuilt. Here is a snippet of the compile of a the library from lower in the output.
Using library SrcWrapper version 1.0.1 in folder /libraries/SrcWrapper"
Using previously compiled file: D:\System\WinTemp\VMBuilds\Testme3\STM32_GenF0\Release\SrcWrapper\syscalls.c.o
Using previously compiled file: hal.c.o
Using previously compiled file: hal_adc.c.o
As stated earlier, you should take an empty project that has just a setup() and loop(). The full clean build time with deep search on should be around 80secs and 2nd build sub 10 seconds with deep search enabled, faster without.
To clearly see any issues you should do as I say with empty project and also as I have said ensure debug is off. With debug on there is a lot more in the trace which makes it less clear.
When you can build a simple project at reasonable speed I suggest adding one simple .cpp to your project. Then see the difference between 1st and 2nd build after adding the file. We should see the new file is not compiled the 2nd time because the cache is used.
Then add one library, a simple one that does not include lots of files or other libraries. Then in two builds we should see it being cached.