in src/AzureCacheOptionsProviderWithToken.cs [115:128]
public override async Task AfterConnectAsync(ConnectionMultiplexer connectionMultiplexer, Action<string> log)
{
try
{
// This is a new connection, so we can assume it was authenticated with the current token
_cacheConnections.TryAdd(_nextConnectionId++, new(connectionMultiplexer, _tokenExpiry));
await base.AfterConnectAsync(connectionMultiplexer, log).ConfigureAwait(false);
}
catch (Exception ex)
{
log.Invoke($"Microsoft.Azure.StackExchangeRedis: Failed to initialize new connection: {ex}");
}
}