Skip to content

Commit 82682f2

Browse files
committed
fix
1 parent dbd3376 commit 82682f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func getHashMember(client redigo.Conn, identifier, key string) (value any, err e
137137
}
138138

139139
// StoreCaches store multiple object by keys
140-
func StoreCaches[K comparable, V any](cacheKeeper Keeper, keys []K, buffer map[K]*V, cacheKeyFunc func(K) string) {
140+
func StoreCaches[K comparable, V any](cacheKeeper Keeper, keys []K, buffer map[K]V, cacheKeyFunc func(K) string) {
141141
logger := logrus.WithFields(logrus.Fields{
142142
"keys": keys,
143143
"buffer": utils.Dump(buffer),

common_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func TestStoreMapValues(t *testing.T) {
8888
buffer[key] = &TestObj{ID: key}
8989
}
9090

91-
StoreCaches[int64, TestObj](k, keys, buffer, testCacheKey)
91+
StoreCaches[int64, *TestObj](k, keys, buffer, testCacheKey)
9292

9393
for _, key := range keys {
9494
assert.True(t, m.Exists(testCacheKey(key)))
@@ -111,7 +111,7 @@ func TestStoreMapValues(t *testing.T) {
111111

112112
testKeys := []int64{4, 7, 8}
113113

114-
StoreCaches[int64, TestObj](k, []int64{4, 7, 8}, buffer, testCacheKey)
114+
StoreCaches[int64, *TestObj](k, []int64{4, 7, 8}, buffer, testCacheKey)
115115

116116
for _, key := range testKeys {
117117
if key == 4 {

0 commit comments

Comments
 (0)