Share via


MsalMemoryTokenCacheProvider Class

Definition

An implementation of token cache for both Confidential and Public clients backed by MemoryCache.

public class MsalMemoryTokenCacheProvider : Microsoft.Identity.Web.TokenCacheProviders.MsalAbstractTokenCacheProvider
type MsalMemoryTokenCacheProvider = class
    inherit MsalAbstractTokenCacheProvider
Public Class MsalMemoryTokenCacheProvider
Inherits MsalAbstractTokenCacheProvider
Inheritance
MsalMemoryTokenCacheProvider

Constructors

MsalMemoryTokenCacheProvider(IMemoryCache, IOptions<MsalMemoryTokenCacheOptions>)

Constructor.

Methods

ClearAsync(String)

Clear the cache.

(Inherited from MsalAbstractTokenCacheProvider)
GetSuggestedCacheKey(TokenCacheNotificationArgs)

Method to be overridden by concrete cache serializers to express the suggested key.

(Inherited from MsalAbstractTokenCacheProvider)
Initialize(ITokenCache)

Initializes the token cache serialization.

(Inherited from MsalAbstractTokenCacheProvider)
InitializeAsync(ITokenCache)

Initializes the token cache serialization.

(Inherited from MsalAbstractTokenCacheProvider)
OnBeforeWriteAsync(TokenCacheNotificationArgs)

If you want to ensure that no concurrent write takes place, use this notification to place a lock on the entry.

(Inherited from MsalAbstractTokenCacheProvider)
ReadCacheBytesAsync(String, CacheSerializerHints)

Method to be overridden by concrete cache serializers to Read the cache bytes.

ReadCacheBytesAsync(String)

Reads a blob from the serialization cache (identified by its key).

RemoveKeyAsync(String, CacheSerializerHints)

Method to be overridden by concrete cache serializers to remove an entry from the cache.

(Inherited from MsalAbstractTokenCacheProvider)
RemoveKeyAsync(String)

Removes a token cache identified by its key, from the serialization cache.

WriteCacheBytesAsync(String, Byte[], CacheSerializerHints)

Writes a token cache blob to the serialization cache (identified by its key).

WriteCacheBytesAsync(String, Byte[])

Writes a token cache blob to the serialization cache (identified by its key).

Applies to