Share via


MsalDistributedTokenCacheAdapterOptions.OnL2CacheFailure Property

Definition

Callback offered to the app to be notified when the L2 cache fails. This way the app is given the possibility to act on the L2 cache, for instance, in the case of Redis exception, to reconnect. This is left to the application as it's the only one that knows about the real implementation of the L2 cache. The handler should return true if the cache should try the operation again, and false otherwise. When true is passed and the retry fails, an exception will be thrown.

public Func<Exception,bool>? OnL2CacheFailure { get; set; }
member this.OnL2CacheFailure : Func<Exception, bool> with get, set
Public Property OnL2CacheFailure As Func(Of Exception, Boolean)

Property Value

Applies to