Nebula
Storage

SqlSharedCacheStore

ISharedCacheStore in the orchestrator's database (NebulaDatabase: SQLite or PostgreSQL), table shared_cache.

generated from the sources
public sealed class SqlSharedCacheStore : ISharedCacheStore

ISharedCacheStore in the orchestrator's database (NebulaDatabase: SQLite or PostgreSQL), table shared_cache. It is separate from nebula_entity, so persistence's IPersistenceStore.Clear and a world wipe leave it alone. Each call uses its own pooled connection, so reads and writes run in parallel with persistence's writer thread; a write is one INSERT … ON CONFLICT DO NOTHING, which makes the table write-once and lets two racing puts both succeed.

Constructors

SqlSharedCacheStore

public SqlSharedCacheStore(NebulaDatabase db);

Properties

Backend

public string Backend { get; }

Methods

TryGet

public bool TryGet(string key, out byte[] bytes, out string checksum);

Put

public bool Put(string key, byte[] bytes, string checksum);

RemoveUnreadSince

public int RemoveUnreadSince(DateTime cutoffUtc);

Clear

public int Clear();

Count

public long Count();

TotalBytes

public long TotalBytes();

Dispose

public void Dispose();

On this page