Use LinkedHashSet in LoadingCache.java
@@ -3,7 +3,7 @@ package com.alicp.jetcache;
import com.alicp.jetcache.event.CacheEvent;
import java.util.HashMap;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
@@ -58,7 +58,7 @@ public class LoadingCache<K, V> extends SimpleProxyCache<K, V> {
} else {
kvMap = new HashMap<>();
}
- Set<K> keysNeedLoad = new HashSet<>();
+ Set<K> keysNeedLoad = new LinkedHashSet<>();
keys.forEach((k) -> {
if (!kvMap.containsKey(k)) {
keysNeedLoad.add(k);
