C# Class Noear.Weed.Cache.CacheTags

Show file Open project: noear/Weed3 Class Usage Examples

Public Methods

Method Description
CacheTags ( ICacheService caching ) : System
add ( String tag, String targetCacheKey ) : void

为缓存添加一个标签(同步 Add)

beginAdd ( String tag ) : void

为缓存添加一个标签(异步 Add{begin})

clear ( String tag ) : CacheTags

清空[@tag=val]相关的所有缓存

count ( String tag ) : int
endAdd ( IWeedKey target ) : void

为缓存添加一个标签(异步 Add{end})

endAdd ( String targetCacheKey ) : void

为缓存添加一个标签(异步 Add{end})

getCacheKey ( String tag, int index ) : String
getCacheKeys ( String tag ) : List

获取一个标签里的内容

removeTag ( String tag, String val, IWeedKey target ) : void
removeTag ( String tag, String val, String targetCacheKey ) : void

Private Methods

Method Description
KEY ( String tag ) : String
this ( String key ) : List

Method Details

CacheTags() public method

public CacheTags ( ICacheService caching ) : System
caching ICacheService
return System

add() public method

为缓存添加一个标签(同步 Add)
public add ( String tag, String targetCacheKey ) : void
tag String 标签
targetCacheKey String 目标缓存键
return void

beginAdd() public method

为缓存添加一个标签(异步 Add{begin})
public beginAdd ( String tag ) : void
tag String 标签
return void

clear() public method

清空[@tag=val]相关的所有缓存
public clear ( String tag ) : CacheTags
tag String
return CacheTags

count() public method

public count ( String tag ) : int
tag String
return int

endAdd() public method

为缓存添加一个标签(异步 Add{end})
public endAdd ( IWeedKey target ) : void
target IWeedKey 目标
return void

endAdd() public method

为缓存添加一个标签(异步 Add{end})
public endAdd ( String targetCacheKey ) : void
targetCacheKey String 目标缓存键
return void

getCacheKey() public method

public getCacheKey ( String tag, int index ) : String
tag String
index int
return String

getCacheKeys() public method

获取一个标签里的内容
public getCacheKeys ( String tag ) : List
tag String
return List

removeTag() public method

public removeTag ( String tag, String val, IWeedKey target ) : void
tag String
val String
target IWeedKey
return void

removeTag() public method

public removeTag ( String tag, String val, String targetCacheKey ) : void
tag String
val String
targetCacheKey String
return void