public class CaffeineCache extends Object implements Level1Cache
| 构造器和说明 |
|---|
CaffeineCache(com.github.benmanes.caffeine.cache.Cache<String,Object> cache,
long size,
long expire) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Clear the cache
|
void |
evict(String... keys)
Remove items from the cache
|
Map<String,Object> |
get(Collection<String> keys)
批量获取缓存对象
|
Object |
get(String key)
Get an item from the cache, nontransactionally
|
Collection<String> |
keys()
Return all keys
|
void |
put(Map<String,Object> elements)
批量插入数据
|
void |
put(String key,
Object value)
Add an item to the cache, nontransactionally, with
failfast semantics
|
long |
size()
返回该缓存区域中,内存存储对象的最大数量
|
long |
ttl()
返回该缓存区域的 TTL 设置(单位:秒)
|
public long ttl()
Level1Cachettl 在接口中 Level1Cachepublic long size()
Level1Cachesize 在接口中 Level1Cachepublic void put(String key, Object value)
Cachepublic Collection<String> keys()
CacheCopyright © 2018. All rights reserved.