Protocol
Cache
Codable key-value pair cache.
protocol Cache
Topics
Instance Methods
func delete(_:)func `for`(Request) -> SelfCreates a request-specific cache instance.func get(_:)Gets a decodable value from the cache. Returnsnilif not found.func get<T>(String, as: T.Type) -> EventLoopFuture<T?>Gets a decodable value from the cache. Returnsnilif not found.func set<T>(String, to: T?) -> EventLoopFuture<Void>Sets an encodable value into the cache. Existing values are replaced. Ifnil, 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. Ifnil, removes value.