HACacheKey

public protocol HACacheKey

A cache key for HACachesContainer

  • The value type in the cache, e.g. T in HACache<T>

    Declaration

    Swift

    associatedtype Value
  • Create a cache on a particular connection

    This is called exactly once per connection per cache key.

    Declaration

    Swift

    static func create(
        connection: HAConnection,
        data: [String: Any]
    ) -> HACache<Value>

    Parameters

    connection

    The connection to create on

    data

    The data passed to connection request

    Return Value

    The cache you want to associate with the key