mirror of
https://github.com/bitwarden/server
synced 2026-01-02 00:23:40 +00:00
Use FrozenDictionary in StaticClientStore (#3833)
* Add Benchmark * Use FrozenDictionary * Use TryGetValue * Format
This commit is contained in:
@@ -80,9 +80,9 @@ public class ClientStore : IClientStore
|
||||
return await CreateUserClientAsync(clientId);
|
||||
}
|
||||
|
||||
if (_staticClientStore.ApiClients.ContainsKey(clientId))
|
||||
if (_staticClientStore.ApiClients.TryGetValue(clientId, out var client))
|
||||
{
|
||||
return _staticClientStore.ApiClients[clientId];
|
||||
return client;
|
||||
}
|
||||
|
||||
return await CreateApiKeyClientAsync(clientId);
|
||||
|
||||
Reference in New Issue
Block a user