語言

MicrosoftIdentityOptions.UseFastUnboundedCache 屬性

定義

當設定為 true時,記憶體內的標記快取會使用 MSAL 內部的共享(靜態)快取,而非序列 IMemoryCache 化提供者。

預設為 false (推薦)。 當 false時,標記會透過記憶體序列化提供者儲存,因此快取會尊重每個項目的到期時間、記憶體快取大小限制及快取金鑰分割。

設定為 以 true 提供快速且全程的靜態快取。 它避免了每次請求序列化,但無 界 (不逐出過期標記),並忽略過期/大小選項及分割鉤子。 這可以透過配置(例如 "AzureAd": { "UseFastUnboundedCache": true })。

public bool UseFastUnboundedCache { get; set; }
member this.UseFastUnboundedCache : bool with get, set
Public Property UseFastUnboundedCache As Boolean

屬性值

適用於