OnlineCachePolicy

public enum OnlineCachePolicy
extension OnlineCachePolicy: Equatable

The cache which is being used while fetching map tiles.

  • A cache policy to entirely disgards caching.

    Declaration

    Swift

    case noCache
  • A cache policy which allows caching. Associated values are memoryCapacity, diskCapacity, and cacheDurationFilter. The associated values are described as follows: memoryCapacity: The caching capacity, in bytes, while caching the tiles to system memory. diskCapacity: The caching capacity, in bytes, while caching the tiles to disk. cacheDurationFilter: Mapping of the data duration in cache to the corresponding request URL filter. When an HTTP response is cacheable, if the request URL contains the String, then the entry will be stored in cache for a Measurement of time.

    Declaration

    Swift

    case cache(
        memoryCapacity: Int,
        diskCapacity: Int,
        cacheDurationFilter: [String: Measurement<UnitDuration>]
    )

Public

  • A policy that doesn’t specify a maximum amount of time that a fetched resource should be allowed to remain in cache. Instead, this would be handled by the server. The default maximum number of bytes that cache should use to store its data is 10MB for disk, and 5MB for memory.

    Declaration

    Swift

    public static var `default`: OnlineCachePolicy

Equatable

  • Declaration

    Swift

    public static func == (lhs: OnlineCachePolicy, rhs: OnlineCachePolicy) -> Bool