Extended Protocol
RedisClient
extension RedisClient
Topics
Instance Methods
func exists(_:)Checks the existence of the provided keys in the database.func expire(RedisKey, after: TimeAmount) async throws -> BoolSets a timeout on key. After the timeout has expired, the key will automatically be deleted.func get(_:asJSON:jsonDecoder:)Gets the provided key as a decodable type.func pttl(RedisKey) async throws -> RedisKey.LifetimeReturns the remaining time-to-live (in milliseconds) of the provided key.func set(_:toJSON:jsonEncoder:)Sets key to an encodable item.func setex(_:toJSON:expirationInSeconds:jsonEncoder:)Sets key to an encodable item with an expiration time.func ttl(RedisKey) async throws -> RedisKey.LifetimeReturns the remaining time-to-live (in seconds) of the provided key.