fix hash key
This commit is contained in:
2
cache/redis/redis.go
vendored
2
cache/redis/redis.go
vendored
@@ -59,6 +59,6 @@ func New(dsn string, hashRadix string) *RedisClient {
|
||||
|
||||
func Hash(s string) int {
|
||||
h := fnv.New32a()
|
||||
h.Write([]byte(s))
|
||||
h.Write([]byte(strings.ToLower(s)))
|
||||
return int(h.Sum32()) % vars.RedisShardings
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user