Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Instance Method

set(_:to:expiresIn:)

Sets an encodable value into the cache with an expiry time. Existing values are replaced. If nil, removes value.
func set<T>(_ key: String, to value: T?, expiresIn expirationTime: CacheExpirationTime?) async throws where T : Encodable, T : Sendable