fix / redis.getKeysConn() returns keys without Config.Prefix otherwise such keys passed into updateTTLConn() would get duplicate prefixes failing the ttl reset

Former-commit-id: bfcc02e5db16216d221c533fc28919fe292d6532
This commit is contained in:
Akira Ho 2018-08-16 17:42:01 +08:00
parent 4e7ca254d9
commit 45c1f6427f

View File

@ -201,7 +201,7 @@ func (r *Service) getKeysConn(c redis.Conn, prefix string) ([]string, error) {
if keysSliceAsBytes, ok := keysInterface[1].([]interface{}); ok {
keys := make([]string, len(keysSliceAsBytes), len(keysSliceAsBytes))
for i, k := range keysSliceAsBytes {
keys[i] = fmt.Sprintf("%s", k)
keys[i] = fmt.Sprintf("%s", k)[len(r.Config.Prefix):]
}
return keys, nil