Skip to content

Commit

Permalink
Use a stable path for default HTTP cache dir (#71)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gabrielfeo authored May 23, 2023
1 parent 7d71888 commit 2fcb1a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ data class Config(
*/
val cacheDir: File =
env["GRADLE_ENTERPRISE_API_CACHE_DIR"]?.let(::File)
?: File(System.getProperty("java.io.tmpdir"), "gradle-enterprise-api-kotlin-cache"),
?: File(systemProperties["user.home"], ".gradle-enterprise-api-kotlin-cache"),

/**
* Max size of the HTTP cache. By default, uses environment variable
Expand Down

0 comments on commit 2fcb1a5

Please sign in to comment.