Builder
@objc(AASDKAdCachePolicyConfigurationBuilder)
public final class Builder : NSObject
Builder class for AdCachePolicyConfiguration
.
-
Adds a cache option to instruct the
AdManager
what kind of resources to persist. By default, no caching options will be used.Declaration
Swift
@objc public func with(cachePolicy policy: AdCachePolicy) -> Builder
Parameters
policy
a cache option
Return Value
the same builder object
-
Set the timeout of the ads creative resources during caching. Optional. Measured in seconds and only accepts non-zero and positive values. Defaults to 8 seconds. Note that setting low values may trigger the timeout even in very slow but steady network conditions.
Declaration
Swift
@objc public func with(timeoutIntervalForResources: TimeInterval) -> Builder
Parameters
timeoutIntervalForResources
timeout in seconds
Return Value
the same builder object
-
Builds an
AdCachePolicyConfiguration
object.Declaration
Swift
@objc public func build() -> AdCachePolicyConfiguration
Return Value
a
AdCachePolicyConfiguration
object