public interface ICache
Modifier and Type | Method and Description |
---|---|
void |
clear()
清空所有缓存
|
Serializable |
get(String key)
根据key获取value
|
<T> T |
get(String key,
Class<T> clazz)
根据key获取value
|
Collection<String> |
keys()
获取所有的key
|
void |
put(String key,
Serializable value)
将key value保存到缓存中
|
void |
putTemporary(String key,
Serializable value)
临时添加一个值,用于防止缓存穿透攻击
|
void |
remove(String key)
删除一个key
|
void clear()
Serializable get(String key)
key
- Collection<String> keys()
void put(String key, Serializable value)
key
- value
- void remove(String key)
key
- void putTemporary(String key, Serializable value)
key
- value
- Copyright © 2018. All rights reserved.