C# Class Brook.Totp.WebLogin2FA.Cache.CacheManage

Inheritance: ICacheManage
Show file Open project: yuefengkai/Brook.Totp

Public Methods

Method Description
CacheManage ( IMemoryCache memoryCache ) : Microsoft.Extensions.Caching.Memory
Get ( string key ) : T
GetOrCreate ( string key, Func factory ) : T
Remove ( string key ) : void
Set ( string key, object value, int seconds = int.MaxValue ) : void

Method Details

CacheManage() public method

public CacheManage ( IMemoryCache memoryCache ) : Microsoft.Extensions.Caching.Memory
memoryCache IMemoryCache
return Microsoft.Extensions.Caching.Memory

Get() public method

public Get ( string key ) : T
key string
return T

GetOrCreate() public method

public GetOrCreate ( string key, Func factory ) : T
key string
factory Func
return T

Remove() public method

public Remove ( string key ) : void
key string
return void

Set() public method

public Set ( string key, object value, int seconds = int.MaxValue ) : void
key string
value object
seconds int
return void