public interface CacheX
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
清空缓存信息
|
Map<String,Object> |
read(Collection<String> keys)
从缓存中获得一组对象信息
|
Object |
read(String key)
从缓存中获得对象
|
void |
remove(String... keys)
从缓存中移除对象
|
void |
write(Map<String,Object> map,
long expire)
将对象加入到缓存,使用指定失效时长
|
void |
write(String key,
Object value,
long expire)
将对象加入到缓存,使用指定失效时长
|
Object read(String key)
key - 键read(String)Map<String,Object> read(Collection<String> keys)
keys - 多个键void write(String key, Object value, long expire)
key - 键value - 缓存的对象expire - 失效时长,单位毫秒write(String, Object, long)void write(Map<String,Object> map, long expire)
map - 缓存的对象expire - 失效时长,单位毫秒write(Map, long)void remove(String... keys)
keys - 键void clear()
Copyright © 2019. All rights reserved.