Skip to content

Commit

Permalink
Merge pull request #12 from Mesod/invalidated-data
Browse files Browse the repository at this point in the history
Fix cache update issue
  • Loading branch information
pedramteymoori authored Sep 22, 2020
2 parents e5a580e + 9abfc92 commit 73cd8b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c-redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (rc *redisCache) Set(ctx context.Context, key string, value interface{}) er
}
client := rc.pickClient(key, true).WithContext(ctx)
startMarker := rc.watcher.Start()
setError := client.SetNX(key, finalData, rc.cacheTTL).Err()
setError := client.Set(key, finalData, rc.cacheTTL).Err()
if setError != nil {
rc.watcher.Done(startMarker, rc.layerName, "set", "error")
} else {
Expand Down

0 comments on commit 73cd8b0

Please sign in to comment.