[#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) public static ContainerID ToMessage(this ContainerId model)
{ {
if (!Cache.Owners.TryGetValue(model, out ContainerID? message)) if (!Cache.Containers.TryGetValue(model, out ContainerID? message))
dstepanov-yadro marked this conversation as resolved Outdated

Why containerID from owners cache?

Why containerID from owners cache?

This is a typo, sure. Fixed.

This is a typo, sure. Fixed.
{ {
message = new ContainerID message = new ContainerID
{ {
Value = ByteString.CopyFrom(Base58.Decode(model.Value)) Value = ByteString.CopyFrom(Base58.Decode(model.Value))
}; };
Cache.Owners.Set(model, message, _oneHourExpiration); Cache.Containers.Set(model, message, _oneHourExpiration);
} }
return message!; return message!;