SharedCache
ISharedCacheClient
A worker's way to the shared cache.
generated from the sources
Interface in namespace
Nebula · Packages/com.1by3.nebula/Runtime/SharedCache/SharedCacheClient.cspublic interface ISharedCacheClient : IDisposableA worker's way to the shared cache. NebulaSharedCache holds the one a process uses; the bootstrap installs LocalSharedCacheClient or RemoteSharedCacheClient.
Properties
Backend
string Backend { get; }"folder", "memory", "remote", "sqlite" or "postgres": where the objects end up.
Stats
SharedCacheStats Stats { get; }What this client has done so far.
Methods
TryGetAsync
Task<byte[]> TryGetAsync(string key, CancellationToken ct = default);The object stored under key, or null on a miss, an error, a timeout or a cancelled call.
PutAsync
Task PutAsync(string key, byte[] bytes, CancellationToken ct = default);Store bytes under key unless it is already stored. Never throws for a backend failure.