Instance Methodvapor 4.106.3Vapor
get(_:)
Gets a decodable value from the cache. Returns nil
if not found.
func get<T>(_ key: String) -> EventLoopFuture<T?> where T : Decodable
Other members in extension
Instance members
func delete(String
) -> EventLoopFuture<Void> func delete(String
) async throws func get<T>(String
) async throws -> T? Gets a decodable value from the cache. Returns
nil
if not found.func get<T>(String, as: T.Type
) async throws -> T? Gets a decodable value from the cache. Returns
nil
if not found.func set<T>(String, to: T?
) async throws Sets an encodable value into the cache. Existing values are replaced. If
nil
, removes value.func set<T>(String, to: T?, expiresIn: CacheExpirationTime?
) -> EventLoopFuture<Void> Sets an encodable value into the cache with an expiry time. Existing values are replaced. If
nil
, removes value.func set<T>(String, to: T?, expiresIn: CacheExpirationTime?
) async throws Sets an encodable value into the cache with an expiry time. Existing values are replaced. If
nil
, removes value.