class

Session::ClusterCoordinator(T)

Inherits Reference < Object

Main cluster coordinator for managing pub/sub and local caching

Generic Constraint: T must inherit from Session::Base - represents the session type Internally manages LocalCache(T) for caching complete session objects

Constructors

new(redis : Redis, config : ClusterConfig = ClusterConfig.new)
Source

Instance methods

config
Source
local_cache
Source
node_id
Source
publish_cache_clear

Publish a cache clear message to all nodes

Source
publish_invalidation(session_id : String) : Nil

Publish a session invalidation message to the cluster

Source
publish_session_invalidated(session_id : String) : Nil

Publish a session updated message (for invalidation on update)

Source
running?

Check if the coordinator is running

Source
start

Start the background subscription fiber

Source
stop

Gracefully stop the coordinator

Source