Cache Config
constructor(cacheEnabled: Boolean = env["DEVELOCITY_API_CACHE_ENABLED"].toBoolean(), cacheDir: File = env["DEVELOCITY_API_CACHE_DIR"]?.let(::File)
?: run {
val userHome = checkNotNull(systemProperties.userHome) { ERROR_NULL_USER_HOME }
File(userHome, ".develocity-api-kotlin-cache")
}, maxCacheSize: Long = env["DEVELOCITY_API_MAX_CACHE_SIZE"]?.toLong()
?: 1_000_000_000L, longTermCacheUrlPattern: Regex = env["DEVELOCITY_API_LONG_TERM_CACHE_URL_PATTERN"]?.toRegex()
?: Regex(
"""
.*/api/builds/[\d\w]+/(?:gradle|maven)-(?:attributes|build-cache-performance)
""".trimIndent()
), longTermCacheMaxAge: Long = env["DEVELOCITY_API_SHORT_TERM_CACHE_MAX_AGE"]?.toLong()
?: 365.days.inWholeSeconds, shortTermCacheUrlPattern: Regex = env["DEVELOCITY_API_SHORT_TERM_CACHE_URL_PATTERN"]?.toRegex()
?: """.*/builds(?:\?.*|\Z)""".toRegex(), shortTermCacheMaxAge: Long = env["DEVELOCITY_API_SHORT_TERM_CACHE_MAX_AGE"]?.toLong()
?: 1.days.inWholeSeconds)(source)