Cache

public final class Cache

Cache is used internally for various tasks such as in-memory caching image data. Primarily used in UIImageView|NSImageView|WKInterfaceImage and Image (SwiftUI) helpers.

  • Singleton object.

    Declaration

    Swift

    public static let shared: Cache
  • Configures the cache.

    Declaration

    Swift

    public func configureCache(countLimit: Int, size: Int)

    Parameters

    countLimit

    The maximum number of objects the cache will hold.

    size

    The maximum total size (in bytes) the cache will hold before it starts removing objects.

  • Clears cache.

    Declaration

    Swift

    public func clearCache()