Skip to content

Protocol

Cache

Codable key-value pair cache.
protocol Cache

Topics

Instance Methods

  • delete(_:)
  • for(_:)
    Creates a request-specific cache instance.
  • get(_:)
    Gets a decodable value from the cache. Returns nil if not found.
  • get(_:as:)
    Gets a decodable value from the cache. Returns nil if not found.
  • set(_:to:)
    Sets an encodable value into the cache. Existing values are replaced. If nil, removes value.
  • set(_:to:expiresIn:)
    Sets an encodable value into the cache with an expiry time. Existing values are replaced. If nil, removes value.