Skip to content

Commit

Permalink
Merge pull request #11 from elunez/master
Browse files Browse the repository at this point in the history
修改HashMap初始化容量,减少不必要的扩容,提高性能 (elunez#760)
  • Loading branch information
caiming100 committed Aug 8, 2022
2 parents daca446 + 62cb72e commit 2679d46
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisC
@Override
public KeyGenerator keyGenerator() {
return (target, method, params) -> {
Map<String,Object> container = new HashMap<>(4);
Map<String,Object> container = new HashMap<>(8);
Class<?> targetClassClass = target.getClass();
// 类地址
container.put("class",targetClassClass.toGenericString());
Expand Down

0 comments on commit 2679d46

Please sign in to comment.