C# Class Ivony.Caching.DiskCacheProvider

基于磁盘文件的缓存提供程序
Inheritance: IAsyncCacheProvider
Mostrar archivo Open project: Ivony/Ivony.Caching

Public Methods

Method Description
Clear ( ) : System.Threading.Tasks.Task

清除所有缓存

DiskCacheProvider ( string path ) : System

创建 DiskCacheProvider 对象

DiskCacheProvider ( string path, IFormatter serializer ) : System

创建 DiskCacheProvider 对象

Dispose ( ) : void

释放所有资源,停止提供缓存

Get ( string cacheKey ) : Task

获取一个缓存值

Remove ( string cacheKey ) : System.Threading.Tasks.Task

移除一个缓存项

Set ( string cacheKey, object value, CachePolicyItem cachePolicy ) : System.Threading.Tasks.Task

设置一个缓存

Method Details

Clear() public method

清除所有缓存
public Clear ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

DiskCacheProvider() public method

创建 DiskCacheProvider 对象
public DiskCacheProvider ( string path ) : System
path string 磁盘缓存路径
return System

DiskCacheProvider() public method

创建 DiskCacheProvider 对象
public DiskCacheProvider ( string path, IFormatter serializer ) : System
path string 磁盘缓存路径
serializer IFormatter 二进制序列化器
return System

Dispose() public method

释放所有资源,停止提供缓存
public Dispose ( ) : void
return void

Get() public method

获取一个缓存值
public Get ( string cacheKey ) : Task
cacheKey string 缓存键
return Task

Remove() public method

移除一个缓存项
public Remove ( string cacheKey ) : System.Threading.Tasks.Task
cacheKey string 要移除的缓存键
return System.Threading.Tasks.Task

Set() public method

设置一个缓存
public Set ( string cacheKey, object value, CachePolicyItem cachePolicy ) : System.Threading.Tasks.Task
cacheKey string 缓存键
value object 缓存值
cachePolicy CachePolicyItem 缓存策略
return System.Threading.Tasks.Task