CachingConfiguration

class CachingConfiguration(val cacheMemoryMaxSize: Memory = DEFAULT_CACHE_MEMORY_MAX_SIZE, val cacheStorageConfiguration: CacheStorageConfiguration? = DEFAULT_CACHE_STORAGE_CONFIGURATION)

Configuration parameters for caching navigation map data that is stored in NavigationTileStore. It configures in-memory tile store size and the persistent store.

Constructors

Link copied to clipboard
constructor(cacheMemoryMaxSize: Memory = DEFAULT_CACHE_MEMORY_MAX_SIZE, cacheStorageConfiguration: CacheStorageConfiguration? = DEFAULT_CACHE_STORAGE_CONFIGURATION, tileRefreshPeriod: Duration = DEFAULT_TILE_REFRESH_PERIOD)

Creates a new CachingConfiguration. Important: This is a Public Preview API. It may be changed or removed at any time.

constructor(cacheMemoryMaxSize: Memory = DEFAULT_CACHE_MEMORY_MAX_SIZE, cacheStorageConfiguration: CacheStorageConfiguration? = DEFAULT_CACHE_STORAGE_CONFIGURATION)

Creates a new CachingConfiguration.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Size limit for the in-memory tile store. The parameter defaults to DEFAULT_CACHE_MEMORY_MAX_SIZE. It behaves like a soft limit, ensuring that essential data is preserved in memory, even if it surpasses the specified limit. A very small limit may lead to increased disk reading, as tiles are promptly removed from memory once they are no longer immediately required. An excessively high limit may result in tiles occupying a significant amount of memory over an extended period.

Link copied to clipboard

Persistent cache storage configuration. CacheStorageConfiguration configures path and maximum disk size of the persistent cache storage. If the parameter is omitted, the default persistent cache storage configuration is used. If the parameter is set to null, persistent cache storage is NOT used.

Link copied to clipboard

The period after which a downloaded tile is considered stale and automatically triggers a refresh when accessed. The parameter defaults to DEFAULT_TILE_REFRESH_PERIOD.

Functions

Link copied to clipboard
fun copy(cacheMemoryMaxSize: Memory = this.cacheMemoryMaxSize, cacheStorageConfiguration: CacheStorageConfiguration? = this.cacheStorageConfiguration): CachingConfiguration

Creates a copy of this CachingConfiguration object with optional parameter overrides.

fun copy(cacheMemoryMaxSize: Memory = this.cacheMemoryMaxSize, cacheStorageConfiguration: CacheStorageConfiguration? = this.cacheStorageConfiguration, tileRefreshPeriod: Duration = DEFAULT_TILE_REFRESH_PERIOD): CachingConfiguration

Creates a copy of this CachingConfiguration object with optional parameter overrides. Important: This is a Public Preview API. It may be changed or removed at any time.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks if this CachingConfiguration object is equal to another object.

Link copied to clipboard
open override fun hashCode(): Int

Generates a hash code for this CachingConfiguration object.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the object.