Table of Contents

Class CacheFile

Namespace
The.Caching.Storage
Assembly
Instagile.dll
public class CacheFile : VersionedObject
Inheritance
CacheFile
Inherited Members

Constructors

CacheFile()

public CacheFile()

Fields

CurrentVersion

Version 3: cache-key hashes are stable (StableHash with the current seed), Guids entries no longer persist a hash - it is recomputed from the key on load - and the file records the Fingerprint of the model that wrote it. Files written by other versions are discarded on load and repopulate from the store.

public const int CurrentVersion = 3

Field Value

int

FileExtension

public const string FileExtension = "theCache"

Field Value

string

ManyEntries

public Dictionary<Guids, Rows> ManyEntries

Field Value

Dictionary<Guids, Rows>

OneEntries

public Dictionary<Guid, Row> OneEntries

Field Value

Dictionary<Guid, Row>

Properties

AllBlob

public CacheFileBlob AllBlob { get; set; }

Property Value

CacheFileBlob

Fingerprint

The SchemaFingerprint of the model that wrote these rows. Rows store their attributes and relationships by storage index, so a file written by any other model describes different columns; the cache discards one whose fingerprint does not match the running model rather than reading its rows as though they were current.

public string Fingerprint { get; set; }

Property Value

string

OneBlob

public CacheFileBlob OneBlob { get; set; }

Property Value

CacheFileBlob

UpdatedAt

public required DateTimeOffset UpdatedAt { get; set; }

Property Value

DateTimeOffset

ViewBlob

public CacheFileBlob ViewBlob { get; set; }

Property Value

CacheFileBlob

Methods

AfterLoad()

public override void AfterLoad()

BeforeSave()

public override void BeforeSave()