Class MemoryCacheUserInfoUpdaterCache
This implementation of the IUserInfoUpdater uses the Asp.Net Core Microsoft.Extensions.Caching.Memory.IMemoryCache internally
Inheritance
System.Object
MemoryCacheUserInfoUpdaterCache
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dangl.Identity.Client.Mvc.Services
Assembly: Dangl.Identity.Client.Mvc.dll
Syntax
public class MemoryCacheUserInfoUpdaterCache : IUserInfoUpdaterCache
Constructors
| Improve this Doc View SourceMemoryCacheUserInfoUpdaterCache(IMemoryCache)
This implementation of the IUserInfoUpdater uses the Asp.Net Core Microsoft.Extensions.Caching.Memory.IMemoryCache internally
Declaration
public MemoryCacheUserInfoUpdaterCache(IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache |
Methods
| Improve this Doc View SourceCacheUserIdAsync(Guid, DateTime)
Caches the UserId with a given expiration time
Declaration
public Task CacheUserIdAsync(Guid userId, DateTime expiration)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | userId | |
System.DateTime | expiration |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
HasUserIdCachedAsync(Guid)
Returns true if the UserId is in the cache
Declaration
public Task<bool> HasUserIdCachedAsync(Guid userId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | userId |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |