Cache.Entry| 限定符和类型 | 字段和说明 |
|---|---|
static java.io.File |
networkCacheRoot
缓存的根目录
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
checkCacheRoot()
检查是否初始化缓存根目录
|
void |
clear()
Empties the cache.
|
Cache.Entry |
get(java.lang.String key)
Retrieves an entry from the cache.
|
static ServerCache |
getInstance() |
void |
initialize()
Performs any potentially long-running actions needed to initialize the cache;
will be called from a worker thread.
|
void |
invalidate(java.lang.String key,
boolean fullExpire)
Invalidates an entry in the cache.
|
boolean |
isExistsCache(java.lang.String key)
判断缓存是否存在
|
void |
put(java.lang.String key,
Cache.Entry entry)
Adds or replaces an entry to the cache.
|
void |
remove(java.lang.String key)
Removes an entry from the cache.
|
public static ServerCache getInstance()
public Cache.Entry get(java.lang.String key)
Cacheget 在接口中 Cachekey - Cache keyCache.Entry or null in the event of a cache misspublic void put(java.lang.String key,
Cache.Entry entry)
Cachepublic void initialize()
Cacheinitialize 在接口中 Cachepublic void invalidate(java.lang.String key,
boolean fullExpire)
Cacheinvalidate 在接口中 Cachekey - Cache keyfullExpire - True to fully expire the entry, false to soft expirepublic void remove(java.lang.String key)
Cachepublic static void checkCacheRoot()
public boolean isExistsCache(java.lang.String key)