Skip to content

Commit 2fcb1a5

Browse files
authored
Use a stable path for default HTTP cache dir (#71)
Use the home directory as it's unpredictable when `tmpdir` contents are cleared. Makes it easier to identify when the cache max size is being hit, or a path isn't being properly cached.
1 parent 7d71888 commit 2fcb1a5

File tree

1 file changed

+1
-1
lines changed
  • library/src/main/kotlin/com/gabrielfeo/gradle/enterprise/api

1 file changed

+1
-1
lines changed

library/src/main/kotlin/com/gabrielfeo/gradle/enterprise/api/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ data class Config(
134134
*/
135135
val cacheDir: File =
136136
env["GRADLE_ENTERPRISE_API_CACHE_DIR"]?.let(::File)
137-
?: File(System.getProperty("java.io.tmpdir"), "gradle-enterprise-api-kotlin-cache"),
137+
?: File(systemProperties["user.home"], ".gradle-enterprise-api-kotlin-cache"),
138138

139139
/**
140140
* Max size of the HTTP cache. By default, uses environment variable

0 commit comments

Comments
 (0)