Get build cache directory value

Google easily gets this approach for setting cache dir:

// File: settings.gradle
buildCache {
    local {
        // Set local build cache directory.
        directory = "${settingsDir}/build-cache"

I wanted to change build cache directory by adding sub-dir to default build cache directory, like

directory = "${default_cache_dir}/mysubdir"

How could I get default dir value in gradle runtime?
Would like not to rely to $GRADLE_USER_HOME/build-cache-like expressions.