Skip to content

Commit

Permalink
ContentSquare#319 Fixed Redis Cluster Crossslot Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SouradipPoddar7 committed Mar 6, 2023
1 parent c49a74a commit ccdf295
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cache/redis_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,7 @@ func (r *redisCache) Put(reader io.Reader, contentMetadata ContentMetadata, key
// then it switches the full result to the "real" stringKey available for other goroutines
// nolint:gosec // not security sensitve, only used internally.
random := strconv.Itoa(rand.Int())
stringKeyTmp := stringKey + random + "_tmp"

stringKeyTmp := "{" + stringKey + "}" + random + "_tmp"
ctxSet, cancelFuncSet := context.WithTimeout(context.Background(), putTimeout)
defer cancelFuncSet()
err := r.client.Set(ctxSet, stringKeyTmp, medatadata, r.expire).Err()
Expand Down

0 comments on commit ccdf295

Please sign in to comment.