namespace SeaHaven.Services.Interfaces { /// /// The process-wide cache of expected session stamp values, keyed by user id. /// Registered as a singleton. /// public interface ISessionStampCache { /// Changes on every removal; a read that spans one is not cached. long Generation { get; } /// True with the cached value (null: the account matches nothing) while it is fresh. bool TryGet(string userId, out string? expected); /// Caches a value read at , unless a removal has happened since. void Set(string userId, string? expected, long generation); void Remove(string userId); } }