[#24] Client: Implement pool part1
first iteration - base classes and methods Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
d1271df207
commit
c9a75ea025
72 changed files with 2786 additions and 468 deletions
|
@ -22,14 +22,14 @@ public static class OwnerIdMapper
|
|||
throw new ArgumentNullException(nameof(model));
|
||||
}
|
||||
|
||||
if (!Cache.Owners.TryGetValue(model, out OwnerID? message))
|
||||
if (!Caches.Owners.TryGetValue(model, out OwnerID? message))
|
||||
{
|
||||
message = new OwnerID
|
||||
{
|
||||
Value = ByteString.CopyFrom(model.ToHash())
|
||||
};
|
||||
|
||||
Cache.Owners.Set(model, message, _oneHourExpiration);
|
||||
Caches.Owners.Set(model, message, _oneHourExpiration);
|
||||
}
|
||||
|
||||
return message!;
|
||||
|
@ -42,11 +42,11 @@ public static class OwnerIdMapper
|
|||
throw new ArgumentNullException(nameof(message));
|
||||
}
|
||||
|
||||
if (!Cache.Owners.TryGetValue(message, out FrostFsOwner? model))
|
||||
if (!Caches.Owners.TryGetValue(message, out FrostFsOwner? model))
|
||||
{
|
||||
model = new FrostFsOwner(Base58.Encode(message.Value.ToByteArray()));
|
||||
|
||||
Cache.Owners.Set(message, model, _oneHourExpiration);
|
||||
Caches.Owners.Set(message, model, _oneHourExpiration);
|
||||
}
|
||||
|
||||
return model!;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue