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

    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 to nil, persistent cache storage will NOT be used.

  • Default value constants for CachingConfiguration parameters.

    See more

    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 to nil, persistent cache storage will NOT be used.

    Declaration

    Swift

    public var cacheStorageConfiguration: CacheStorageConfiguration?