SharedCache
RemoteSharedCacheClient
ISharedCacheClient for a worker of a mesh or of Nebula Cloud: GET and PUT /cache/{key} on the orchestrator (SharedCacheHost), over the same address and mesh token that RemotePersistenceStore uses.
generated from the sources
Class in namespace
Nebula · Packages/com.1by3.nebula/Runtime/SharedCache/SharedCacheClient.cspublic sealed class RemoteSharedCacheClient : SharedCacheClientBaseISharedCacheClient for a worker of a mesh or of Nebula Cloud: GET and PUT /cache/{key} on the orchestrator (SharedCacheHost), over the same address and mesh token that RemotePersistenceStore uses. The body is the raw object. Both ends check it against the SHA-256 in the X-Nebula-Checksum header, and a mismatch is a miss on a read and a refused write.
Constructors
RemoteSharedCacheClient
public RemoteSharedCacheClient(string url, string token = null, int maxObjectBytes = SharedCacheKey.DefaultMaxObjectBytes, int maxConcurrent = DefaultMaxConcurrent);Properties
Backend
public override string Backend { get; }Url
public string Url { get; }The orchestrator address this client calls.
Methods
GetCoreAsync
protected override async Task<byte[]> GetCoreAsync(string key, CancellationToken ct);PutCoreAsync
protected override async Task<bool> PutCoreAsync(string key, byte[] bytes, string checksum, CancellationToken ct);Dispose
public override void Dispose();