AutoPurgingImageCache
open class AutoPurgingImageCache : NSObject, ImageRequestCache, @unchecked Sendable
内存自动清理图片缓存
-
Undocumented
Declaration
Swift
open var memoryCapacity: UInt64
-
Undocumented
Declaration
Swift
open var preferredMemoryUsageAfterPurge: UInt64
-
Undocumented
Declaration
Swift
open var memoryUsage: UInt64 { get }
-
Undocumented
Declaration
Swift
override public init()
-
Undocumented
Declaration
Swift
public init(memoryCapacity: UInt64, preferredMemoryCapacity: UInt64)
-
Undocumented
Declaration
Swift
open func addImage(_ image: UIImage, identifier: String)
-
Undocumented
Declaration
Swift
@discardableResult open func removeImage(identifier: String) -> Bool
-
Undocumented
Declaration
Swift
@objc open func removeAllImages()
-
Undocumented
Declaration
Swift
open func image(identifier: String) -> UIImage?
-
Undocumented
Declaration
Swift
open func addImage(_ image: UIImage, for request: URLRequest, additionalIdentifier: String? = nil)
-
Undocumented
Declaration
Swift
@discardableResult open func removeImage(for request: URLRequest, additionalIdentifier: String? = nil) -> Bool
-
Undocumented
Declaration
Swift
open func image(for request: URLRequest, additionalIdentifier: String? = nil) -> UIImage?
-
Undocumented
Declaration
Swift
open func shouldCacheImage(_ image: UIImage, for request: URLRequest, additionalIdentifier: String? = nil) -> Bool
-
Undocumented
Declaration
Swift
open func imageCacheKey(for request: URLRequest, additionalIdentifier: String? = nil) -> String