public class TokenInMemoryCache<TKey, TValue> : ITokenCache<TKey, TValue>
Public Class TokenInMemoryCache(Of TKey, TValue)
Implements ITokenCache(Of TKey, TValue)generic<typename TKey, typename TValue>
public ref class TokenInMemoryCache : ITokenCache<TKey, TValue>type TokenInMemoryCache<'TKey, 'TValue> =
class
interface ITokenCache<'TKey, 'TValue>
end| TokenInMemoryCacheTKey, TValue | Represents an in-memory cache for tokens. It also supports automatic cleanup of tokens. |
| CacheMap | Cached values. |
| CleanupPredicate | A predicate function used to determine whether a cache entry should be removed during cleanup, or null, if all cached entries can be cleaned up. |
| Clock | Объект для предоставления текущего времени в формате Utc. |
| GetCleanupPeriodFunc |
Period after which tokens should be removed from the cache. Allowed values:
|
| LastCleanup | Date/time of last cleanup in UTC. |
| Cleanup | Performs cleanup of cache entries, if necessary. |
| Clear | Clears the cache and resets its state, removing all entries. |
| Equals | Determines whether the specified object is equal to the current object. (Унаследован от Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Унаследован от Object) |
| GetHashCode | Serves as the default hash function. (Унаследован от Object) |
| GetType | Gets the Type of the current instance. (Унаследован от Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Унаследован от Object) |
| ReleaseCleanupLock | Releases a lock for cleaning up the cache. |
| ToString | Returns a string that represents the current object. (Унаследован от Object) |
| TryAcquireCleanupLock | Attempts to acquire a lock for cleaning up the cache if it hasn't already been acquired. |
| TryAddOrUpdate | Attempts to add or update the cache value associated with the specified key. |
| TryGet(FuncTKey, TValue, Boolean, TValue) | Attempts to retrieve the cache value that matches the specified condition. |
| TryGet(TKey, TValue) | Attempts to retrieve the cache value associated with the specified key. |
| TryRemove(FuncTKey, TValue, Boolean, TValue) | Attempts to remove the cache value that matches the specified condition. |
| TryRemove(TKey, TValue) | Attempts to remove the cache value associated with the specified key. |
| TryUpdate | Attempts to update the cache value that matches the specified condition. |