Share via


IKeyManager.GetCacheExpirationToken Method

Definition

Retrieves a token that signals that callers who have cached the return value of GetAllKeys should clear their caches. This could be in response to a call to CreateNewKey or RevokeKey, or it could be in response to some other external notification. Callers who are interested in observing this token should call this method before the corresponding call to GetAllKeys.

public:
 System::Threading::CancellationToken GetCacheExpirationToken();
public System.Threading.CancellationToken GetCacheExpirationToken ();
abstract member GetCacheExpirationToken : unit -> System.Threading.CancellationToken
Public Function GetCacheExpirationToken () As CancellationToken

Returns

The cache expiration token. When an expiration notification is triggered, any tokens previously returned by this method will become canceled, and tokens returned by future invocations of this method will themselves not trigger until the next expiration event.

Remarks

Implementations are free to return 'CancellationToken.None' from this method. Since this token is never guaranteed to fire, callers should still manually clear their caches at a regular interval.

Applies to