public class CacheTagsServiceImpl extends Object implements CacheTagsService
| 构造器和说明 |
|---|
CacheTagsServiceImpl(CacheService caching) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<String> |
_get(String tag)
获取标签键列表
|
protected void |
_set(String tag,
List<String> keyList,
int seconds)
设置缓存键列表
|
protected String |
_tagKey(String tag)
生成标签键
|
<T> T |
get(String key,
Class<T> clz)
获取
|
void |
remove(String key)
移除
|
void |
removeTag(String... tags)
移除
|
void |
store(String key,
Object obj,
int seconds)
保存
|
void |
storeTag(String key,
Object obj,
int seconds,
String... tags)
保存
|
protected void |
update(String key,
String tag,
Object newValue,
int refSeconds)
为缓存添加一个标签
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOrStoreTagget, getOrStorepublic CacheTagsServiceImpl(CacheService caching)
protected void _set(String tag, List<String> keyList, int seconds)
tag - 缓存标签keyList - 标签键列表public <T> T get(String key, Class<T> clz)
CacheServiceget 在接口中 CacheServicekey - 缓存键public void remove(String key)
CacheServiceremove 在接口中 CacheServicekey - 缓存键public void removeTag(String... tags)
CacheTagsServiceremoveTag 在接口中 CacheTagsServicetags - 缓存标签public void store(String key, Object obj, int seconds)
CacheServicestore 在接口中 CacheServicekey - 缓存键obj - 对象seconds - 秒数public void storeTag(String key, Object obj, int seconds, String... tags)
CacheTagsServicestoreTag 在接口中 CacheTagsServicekey - 缓存键obj - 缓存对象seconds - 缓存秒数tags - 缓存标签Copyright © 2023. All rights reserved.