Protocolvapor.redis 4.11.0Redis
RedisSessionsDelegate
A delegate object that controls key behavior of an Application.Redis.Sessions
driver.
protocol RedisSessionsDelegate : Sendable
Supertypes
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
Requirements
Instance members
func makeNewID(
) -> SessionID Makes a new session ID token.
func makeRedisKey(for: SessionID
) -> RedisKey Makes a key to identify the given session ID in Redis.
func redis<Client>(Client, fetchDataFor: RedisKey
) -> EventLoopFuture<SessionData?> Asks the delegate object to fetch session data for a given Redis key.
func redis<Client>(Client, store: SessionData, with: RedisKey
) -> EventLoopFuture<Void> Instructs your delegate object to handle the responsibility of storing the provided session data to Redis.