compileTestGroovy always slow unlike rest of build tasks

Hi all, I have a build which seems to cause compileTestGroovy to always take a minute to finish if I change even one line of the code in that java or groovy.
Note: compileGroovy does not encounter this slow down.

Here is some output from the build:

Task :compileKotlin UP-TO-DATE
:compileKotlin took 376ms

Task :compileJava UP-TO-DATE
:compileJava took 88ms

Task :copyKotlinClassesIntoJavaDirForCompileGroovyToOperate UP-TO-DATE
:copyKotlinClassesIntoJavaDirForCompileGroovyToOperate took 35ms

Task :compileGroovy UP-TO-DATE
:compileGroovy took 142ms

Task :processResources UP-TO-DATE
:processResources took 39ms

Task :classes UP-TO-DATE
:classes took 0ms

Task :compileTestKotlin UP-TO-DATE
:compileTestKotlin took 138ms

Task :compileTestJava UP-TO-DATE
:compileTestJava took 41ms

Task :compileTestGroovy
:compileTestGroovy took 57522ms

Task :processTestResources UP-TO-DATE
:processTestResources took 2ms

Task :testClasses
:testClasses took 0ms

This is a build after adding one newline to a java source file in the src/test folder.

Two questions:

  1. is it expected that this compileGroovyTest could/should be fast like the rest, (using cached outputs etc?)
  2. how to track down that this task is using the cache?

Thanks!