CachingConfiguration
public struct CachingConfiguration
Configuration parameters for caching navigation map data that is stored in NavigationTileStore
.
It configures in-memory tile store size and CacheStorageConfiguration
.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance of CachingConfiguration.
Declaration
Swift
public init( cacheMemoryMaxSize: Measurement<UnitInformationStorage> = Defaults.cacheMemoryMaxSize, cacheStorageConfiguration: CacheStorageConfiguration? = .init() )
Parameters
cacheMemoryMaxSize
Size limit for in-memory tile store. The parameter defaults to
Defaults.cacheMemoryMaxSize
. 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 will be 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.cacheStorageConfiguration
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 will be used. If the parameter is set tonil
, persistent cache storage will NOT be used.
-
Default value constants for
See moreCachingConfiguration
parameters.Declaration
Swift
public enum Defaults
-
Size limit for in-memory store. 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 will be 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.
The parameter defaults to
Defaults.cacheMemoryMaxSize
.Declaration
Swift
public var cacheMemoryMaxSize: Measurement<UnitInformationStorage>
-
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 will be used. If the parameter is set tonil
, persistent cache storage will NOT be used.Declaration
Swift
public var cacheStorageConfiguration: CacheStorageConfiguration?