| 程序包 | 说明 |
|---|---|
| org.tio.utils.cache |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends Serializable> |
CacheUtils.get(ICache cache,
String cacheKey,
boolean putTempToCacheIfNull,
FirsthandCreater<T> firsthandCreater)
根据cacheKey从缓存中获取对象,如果缓存中没有该key对象,则用firsthandCreater获取对象,并将对象用cacheKey存于cache中
|
static <T extends Serializable> |
CacheUtils.get(ICache cache,
String cacheKey,
boolean putTempToCacheIfNull,
FirsthandCreater<T> firsthandCreater,
Long readTimeoutWithSeconds) |
static <T extends Serializable> |
CacheUtils.get(ICache cache,
String cacheKey,
FirsthandCreater<T> firsthandCreater)
根据cacheKey从缓存中获取对象,如果缓存中没有该key对象,则用firsthandCreater获取对象,并将对象用cacheKey存于cache中
|
static <T extends Serializable> |
CacheUtils.get(Long timeToLiveSeconds,
Long timeToIdleSeconds,
String cacheKey,
boolean putTempToCacheIfNull,
FirsthandCreater<T> firsthandCreater)
根据cacheKey从缓存中获取对象,如果缓存中没有该key对象,则用firsthandCreater获取对象,并将对象用cacheKey存于cache中
timeToLiveSeconds和timeToIdleSeconds一个传null一个传值
|
static <T extends Serializable> |
CacheUtils.get(Long timeToLiveSeconds,
Long timeToIdleSeconds,
String cacheKey,
FirsthandCreater<T> firsthandCreater)
根据cacheKey从缓存中获取对象,如果缓存中没有该key对象,则用firsthandCreater获取对象,并将对象用cacheKey存于cache中
|
Copyright © 2019. All rights reserved.