BannerCacheConfiguration

/**
 * Used to set up [BannerCache].
 */
class BannerCacheConfiguration {
    /**
     * Creates the configuration object to be used when creating BannerCache
     *
     * @param placementName The name of the banner placement that will be created. **The placement will be created by the cache and should not be created manually.**
     * @param size          Defines how many preloaded banners should be available in the cache. Should be smaller than {@value MAX_CACHE_SIZE}.
     */
    constructor(placementName: String, size: Int)

    /**
     * Sets optional cache delegate.
     */
    var delegate: CacheDelegate?

    /**
     * The configuration that will be used when requesting new banners.
     */
    var requestConfiguration: BannerRequest?
    
     /**
     * The failure retry interval in seconds
     */
    var retryInterval = 10

    /**
     * Defines if the cache should load additional ad at the beginning.
     *
     * @param shouldCacheAdditionalAdAtStart Boolean indicating if additional ad should be cached.
     */
    fun setShouldCacheAdditionalAdAtStart(shouldCacheAdditionalAdAtStart: Boolean)

    /**
     * Sets the minimum delay between two banner consumptions. 1s by default.
     *
     * @param minDelay The minimum delay in seconds between two banner consumptions.
     */
    fun setMinimumDelay(minDelay: Int)
}

Last updated