語言

MsalDistributedTokenCacheAdapterOptions.OnL2CacheFailure 屬性

定義

回撥會讓應用程式在 L2 快取失敗時收到通知。 這樣應用程式就能對 L2 快取採取行動,例如在 Redis 例外情況下重新連線。 這就交給應用程式處理,因為它是唯一知道 L2 快取實際實作的應用程式。 如果快取應該再次嘗試該操作,false處理器應該回傳true,否則則不然。 當 true 通過且重試失敗時,會拋出例外。

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

屬性值

適用於