Fix a poorly-mirrored cache delete operation.

This commit is contained in:
Jon Chambers 2020-06-17 12:33:22 -04:00 committed by Jon Chambers
parent 6adcebb247
commit c745fe7778
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ public class UsernamesManager {
cacheCluster.useWriteCluster(connection -> {
final RedisAdvancedClusterAsyncCommands<String, String> asyncCommands = connection.async();
maybeOldUsername.ifPresent(asyncCommands::del);
maybeOldUsername.ifPresent(oldUsername -> asyncCommands.del(getUsernameMapKey(oldUsername)));
asyncCommands.set(uuidMapKey, username);
asyncCommands.set(usernameMapKey, uuid.toString());
});