com.foxinmy.weixin4j.cache
Interface CacheStorager<T extends Cacheable>

All Known Implementing Classes:
FileCacheStorager, MemcacheCacheStorager, MemoryCacheStorager, RedisCacheStorager, RedisClusterCacheStorager

public interface CacheStorager<T extends Cacheable>

Cache的存储

Since:
JDK 1.6
Author:
jinyu(foxinmy@gmail.com)
See Also:

Field Summary
static String ALLKEY
          所有的缓存KEY
static long CUTMS
          考虑到临界情况,实际缓存的有效时间减去该毫秒数(60秒)
 
Method Summary
 void caching(String key, T cache)
          缓存新的对象
 void clear()
          清除所有缓存对象(请慎重)
 T evict(String key)
          移除缓存对象
 T lookup(String key)
          查找缓存中的对象
 

Field Detail

CUTMS

static final long CUTMS
考虑到临界情况,实际缓存的有效时间减去该毫秒数(60秒)

See Also:
Constant Field Values

ALLKEY

static final String ALLKEY
所有的缓存KEY

See Also:
Constant Field Values
Method Detail

lookup

T lookup(String key)
查找缓存中的对象

Parameters:
key - 缓存key
Returns:
缓存对象

caching

void caching(String key,
             T cache)
缓存新的对象

Parameters:
key - 缓存key
cache - 将要缓存的对象

evict

T evict(String key)
移除缓存对象

Parameters:
key - 缓存key
Returns:
移除的对象

clear

void clear()
清除所有缓存对象(请慎重)



Copyright © 2014–2017. All rights reserved.