Does Rebuild project from intelliJ use cache?

I am trying to figure what is the difference between the two scenarios.
One is that I am running clean + build. I see that part of the tasks are using the cache, while when I run clean + rebuild project runs without using the cache (which took much longer)
I would like to someone could help me to understand what’s the difference and what I am missing

Actually, you should not always use clean with Gradle builds, as that works against Gradle which is usually very good in avoiding unnecessary work while still reliably building reproducibly. Maven was super bad at that and there it was a necessity to always use clean to get sane results, but this practice should not be taken over to Gradle.

Anyway, regarding the actual question. Without looking at it concretely, I’d guess that the Rebuild adds --rerun-tasks which prevents task results being taken from the cache but all tasks to be run again.