Removed unnessecary hashmap retrieval from cache.
This commit is contained in:
parent
a7db7d289a
commit
1c5baf8762
@ -30,7 +30,7 @@ public class Cache <CacheValueType> {
|
||||
CacheValue<CacheValueType> val = dataCache.get(identifier);
|
||||
val.identifier.usage++;
|
||||
ids.add(val.identifier);
|
||||
return dataCache.get(identifier);
|
||||
return val;
|
||||
}
|
||||
if (ids.size() >= maxCacheSize) {
|
||||
dataCache.remove(ids.poll());
|
||||
|
Loading…
Reference in New Issue
Block a user