SpeculativeLoadingConfig


@Profile.ExperimentalUrlPrefetch
class SpeculativeLoadingConfig


Represents a configuration for speculative loading in a Profile instance. This should be set using setSpeculativeLoadingConfig

Summary

Public functions

@IntRange(from = 1) Int

The max amount of prefetches that can live in the cache.

@IntRange(from = 1) Int

The max amount of prerenders that can live in the cache of any WebView associated with this Profile.

@IntRange(from = 1) Int

The "time to live" for a prefetch inside of the prefetch cache.

Public functions

getMaxPrefetches

Added in 1.13.0
fun getMaxPrefetches(): @IntRange(from = 1) Int

The max amount of prefetches that can live in the cache. WebView will choose the appropriate default value.

getMaxPrerenders

@Profile.ExperimentalUrlPrefetch
fun getMaxPrerenders(): @IntRange(from = 1) Int

The max amount of prerenders that can live in the cache of any WebView associated with this Profile. WebView will choose the appropriate default value.

getPrefetchTtlSeconds

Added in 1.13.0
fun getPrefetchTtlSeconds(): @IntRange(from = 1) Int

The "time to live" for a prefetch inside of the prefetch cache. This is representative of the maximum time that a prefetch is considered valid and can be served to a navigation. WebView will choose the appropriate default value.