Back to Alamofire

Behavior

docs/Structs/ResponseCacher/Behavior.html

5.12.0684 B
Original Source

Behavior

public enum Behavior : Sendable

Defines the behavior of the ResponseCacher type.

`

                cache
                `

Stores the cached response in the cache.

Declaration

Swift

case cache

`

                doNotCache
                `

Prevents the cached response from being stored in the cache.

Declaration

Swift

case doNotCache

`

                modify(_:)
                `

Modifies the cached response before storing it in the cache.

Declaration

Swift

case modify(@Sendable (_ task: URLSessionDataTask, _ cachedResponse: CachedURLResponse) -> CachedURLResponse?)