public class CacheTags extends Object
| 构造器和说明 |
|---|
CacheTags(CacheService caching) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<String> |
_get(String tagKey)
获取缓存键列表
|
protected void |
_set(String tagKey,
List<String> value,
int seconds)
设置缓存键列表
|
protected String |
_tagKey(String tag)
生成标签键
|
void |
add(String tag,
String targetCacheKey,
int refSeconds)
为缓存添加一个标签
|
CacheTags |
remove(String tag)
移除标签相关的所有缓存
|
void |
update(String tag,
Object newValue,
int seconds)
更新标签相关的所有缓存
|
public CacheTags(CacheService caching)
public void add(String tag, String targetCacheKey, int refSeconds)
tag - 标签targetCacheKey - 目标缓存键public void update(String tag, Object newValue, int seconds)
tag - 缓存标签newValue - 新的值seconds - 秒数protected void _set(String tagKey, List<String> value, int seconds)
tagKey - 标签键value - 标签键列表Copyright © 2022. All rights reserved.