private static ConcurrentMap<String, KetamaEntity> cache = new ConcurrentHashMap<String, KetamaEntity>();
public void update(){
ConcurrentMap<String, KetamaEntity> temp = cache;
long start = System.currentTimeMillis();
try {
cache = null;
cache = getCache();//这里获取会比较耗时;
} catch (Exception e) {
log.error("error", e);
}
if (cache == null || cache.size() == 0) {
cache = temp;
}}
------解决思路----------------------
不明觉厉
