[#20] Client: Optimize memory usage #21

Merged
PavelGrossSpb merged 2 commits from PavelGrossSpb/frostfs-sdk-csharp:misc/memory_optimization into master 2024-09-04 19:51:24 +00:00
Showing only changes of commit 6083834582 - Show all commits

View file

@ -15,14 +15,14 @@ public static class ContainerIdMapper
public static ContainerID ToMessage(this ContainerId model)
{
if (!Cache.Owners.TryGetValue(model, out ContainerID? message))
if (!Cache.Containers.TryGetValue(model, out ContainerID? message))
{
message = new ContainerID
{
Value = ByteString.CopyFrom(Base58.Decode(model.Value))
};
Cache.Owners.Set(model, message, _oneHourExpiration);
Cache.Containers.Set(model, message, _oneHourExpiration);
}
return message!;