| Constructor and Description |
|---|
GuavaCache(long size,
long expire) |
| 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> keyValueMap,
long expire)
将对象加入到缓存,使用指定失效时长
|
void |
write(String key,
Object value,
long expire)
将对象加入到缓存,使用指定失效时长
|
public Object read(String key)
Cacheread in interface Cachekey - 键Cache.read(String)public Map<String,Object> read(Collection<String> keys)
Cachepublic void write(String key, Object value, long expire)
Cachewrite in interface Cachekey - 键value - 缓存的对象expire - 失效时长,单位毫秒Cache.write(String, Object, long)public void write(Map<String,Object> keyValueMap, long expire)
Cachewrite in interface CachekeyValueMap - 缓存的对象expire - 失效时长,单位毫秒Cache.write(Map, long)Copyright © 2019. All rights reserved.