SwiftclassMLModelCache

class MLModelCache.CacheManager

Members 8

  1. deinitdeinit
  2. fieldlet activeSessions: Synchronization.Mutex<Set<String>>
  3. fieldlet hashFunction: @Sendable (String) -> String
  4. fieldlet rootURL: Foundation.URL
  5. funcasset(at: String) throws -> Foundation.URL?
  6. funccreateAsset(at: String) throws -> MLModelCache.AssetSession
  7. funcpurgeAsset(at: String) throws -> ()
  8. initMLModelCache.CacheManager.__allocating_init(hashFunction: @Sendable (String) -> String, purgeProtocols: [MLModelCache.PurgeProtocol]) -> MLModelCache.CacheManager
class CacheManager {
    let rootURL: Foundation.URL
    let hashFunction: @Sendable (_: Swift.String) -> Swift.String
    let activeSessions: Synchronization.Mutex<Swift.Set<Swift.String>>

    init(hashFunction: @escaping @Sendable (_: Swift.String) -> Swift.String, purgeProtocols: [any MLModelCache.PurgeProtocol])

    final func purgeAsset(at: Swift.String) throws
    final func createAsset(at: Swift.String) throws -> MLModelCache.AssetSession
    final func asset(at: Swift.String) throws -> Foundation.URL?

    deinit
}