HttpBuildCache

Configuration object for the HTTP build cache. Cache entries are loaded via GET and stored via PUT requests.

A successful GET request must return a response with status 200 (cache hit) or 404 (cache miss), with cache hit responses including the cache entry as the response body. A successful PUT request must return any 2xx response.

PUT requests may also return a 413 Payload Too Large response to indicate that the payload is larger than can be accepted. This is useful when isUseExpectContinue is enabled.

Redirecting responses may be issued with 301, 302, 303, 307 or 308 responses. Redirecting responses to PUT requests must use 307 or 308 to have the PUT replayed. Otherwise, the redirect will be followed with a GET request.

Any other type of response will be treated as an error, causing the remote cache to be disabled for the remainder of the build.

When credentials are configured (see getCredentials), they are sent using HTTP Basic Auth.

Requests that fail during request transmission, after having established a TCP connection, will automatically be retried. This includes dropped connections, read or write timeouts, and low level network failures such as a connection resets. Requests will be retried 3 times, before giving up and disabling use of the cache for the remainder of the build.

Since

3.5

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
@get:Nullable
open var url: URI

Functions

Link copied to clipboard
open fun credentials(configuration: Action<in HttpBuildCacheCredentials>)
Configures the credentials used to access the HTTP cache backend.
Link copied to clipboard
Specifies whether it is acceptable to communicate with a build cache over an insecure HTTP connection.
Link copied to clipboard
Specifies whether it is acceptable to communicate with an HTTP build cache backend with an untrusted SSL certificate.
Link copied to clipboard
open fun isEnabled(): Boolean
Link copied to clipboard
open fun isPush(): Boolean
Link copied to clipboard
Specifies whether HTTP expect-continue should be used for store requests.
Link copied to clipboard
open fun setAllowInsecureProtocol(allowInsecureProtocol: Boolean)
Specifies whether it is acceptable to communicate with a build cache over an insecure HTTP connection.
Link copied to clipboard
open fun setAllowUntrustedServer(allowUntrustedServer: Boolean)
Specifies whether it is acceptable to communicate with an HTTP build cache backend with an untrusted SSL certificate.
Link copied to clipboard
open fun setEnabled(enabled: Boolean)
Link copied to clipboard
open fun setPush(push: Boolean)
Link copied to clipboard
open fun setUrl(url: String)
open fun setUrl(url: URL)
Sets the URL of the cache.
Link copied to clipboard
open fun setUseExpectContinue(useExpectContinue: Boolean)
Specifies whether HTTP expect-continue should be used for store requests.