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
.
-
Creates an instance of
CachingConfiguration
.Declaration
Swift
@available(*, deprecated, message: " This API is deprecated and will be removed with the next major release.\n Please use CachingConfiguration(storageConfiguration,maxMemorySize﹚ instead.") 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 are promptly removed from memory once they are no longer required immediately. 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 is NOT used. -
Creates an instance of
CachingConfiguration
.Declaration
Swift
public init( storageConfiguration: CacheStorageConfiguration = .init(), maxMemorySize: Measurement<UnitInformationStorage> = Defaults.cacheMemoryMaxSize )
Parameters
storageConfiguration
Persistent cache storage configuration.
CacheStorageConfiguration
configures path and maximum disk size of the persistent cache storage.maxMemorySize
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 are promptly removed from memory once they are no longer required immediately. An excessively high limit may result in tiles occupying a significant amount of memory over an extended period. -
Creates a default instance of
CachingConfiguration
.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init()
-
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 are promptly removed from memory once they are no longer required immediately. 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 is used. If the parameter is set tonil
, persistent cache storage is NOT used.Declaration
Swift
@available(*, deprecated, message: " This API is deprecated and will be removed with the next major release.\n Please use storageConfiguration instead.") public var cacheStorageConfiguration: 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 is used.Declaration
Swift
public var storageConfiguration: CacheStorageConfiguration