Skip to content

Commit

Permalink
Return cached HashOperations instance from opsForHash.
Browse files Browse the repository at this point in the history
Closes #2970
  • Loading branch information
mp911de committed Sep 17, 2024
1 parent f687de9 commit 8b7f39b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public class RedisTemplate<K, V> extends RedisAccessor implements RedisOperation
ObjectHashMapper.getSharedInstance());
private final ZSetOperations<K, V> zSetOps = new DefaultZSetOperations<>(this);
private final GeoOperations<K, V> geoOps = new DefaultGeoOperations<>(this);
private final HashOperations<K, ?, ?> hashOps = new DefaultHashOperations<>(this);
private final HyperLogLogOperations<K, V> hllOps = new DefaultHyperLogLogOperations<>(this);
private final ClusterOperations<K, V> clusterOps = new DefaultClusterOperations<>(this);

Expand Down Expand Up @@ -977,7 +978,7 @@ public <HK, HV> BoundHashOperations<K, HK, HV> boundHashOps(K key) {

@Override
public <HK, HV> HashOperations<K, HK, HV> opsForHash() {
return new DefaultHashOperations<>(this);
return (HashOperations) hashOps;
}

@Override
Expand Down

0 comments on commit 8b7f39b

Please sign in to comment.