public class DefaultInternalCacheImpementation extends Object implements InternalCache
| Modifier and Type | Method and Description |
|---|---|
void |
cleanAll() |
void |
cleanCache(int numberOfDays) |
void |
delete(String key) |
void |
get(String key,
long maxAgeInMilliseconds,
String ts,
GenericObjectCallback getCallback) |
boolean |
hasCache(String key) |
boolean |
hasCache(String key,
String ts) |
boolean |
hasValidCache(String key,
String ts,
long maxAgeInMilliseconds)
是否有有效的 cache,本地有相应缓存并且没有超过缓存限制及认为有效
|
static DefaultInternalCacheImpementation |
instance() |
void |
remove(String key,
String ts) |
boolean |
save(String key,
String content,
String lastModifyTs) |
public static DefaultInternalCacheImpementation instance()
public boolean hasValidCache(String key, String ts, long maxAgeInMilliseconds)
InternalCachehasValidCache in interface InternalCachekey - 缓存的keyts - 当前时间maxAgeInMilliseconds - 最大缓存有效时间public void get(String key, long maxAgeInMilliseconds, String ts, GenericObjectCallback getCallback)
get in interface InternalCachepublic void delete(String key)
delete in interface InternalCachepublic boolean save(String key, String content, String lastModifyTs)
save in interface InternalCachepublic void remove(String key, String ts)
remove in interface InternalCachepublic void cleanCache(int numberOfDays)
cleanCache in interface InternalCachepublic boolean hasCache(String key)
hasCache in interface InternalCachepublic boolean hasCache(String key, String ts)
hasCache in interface InternalCachepublic void cleanAll()
cleanAll in interface InternalCacheCopyright © 2017. All rights reserved.