[#20] Client: Optimize memory usage #21
1 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||||
{
|
{
|
||||||
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!;
|
||||||
|
|
Loading…
Reference in a new issue