|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxinmy.weixin4j.cache.FileCacheStorager<T>
public class FileCacheStorager<T extends Cacheable>
用File保存缓存对象
| Field Summary |
|---|
| Fields inherited from interface com.foxinmy.weixin4j.cache.CacheStorager |
|---|
ALLKEY, CUTMS |
| Constructor Summary | |
|---|---|
FileCacheStorager()
默认缓存路径:java.io.tmpdir |
|
FileCacheStorager(String path)
|
|
| Method Summary | |
|---|---|
void |
caching(String key,
T cache)
缓存新的对象 |
void |
clear()
清除所有缓存对象(请慎重) |
T |
evict(String key)
移除缓存对象 |
T |
lookup(String key)
查找缓存中的对象 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileCacheStorager()
public FileCacheStorager(String path)
path - 缓存文件报错| Method Detail |
|---|
public T lookup(String key)
CacheStorager
lookup in interface CacheStorager<T extends Cacheable>key - 缓存key
public void caching(String key,
T cache)
CacheStorager
caching in interface CacheStorager<T extends Cacheable>key - 缓存keycache - 将要缓存的对象public T evict(String key)
CacheStorager
evict in interface CacheStorager<T extends Cacheable>key - 缓存key
public void clear()
CacheStorager
clear in interface CacheStorager<T extends Cacheable>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||