Skip to content

Class CompiledCacheLookup

Namespace: DotBoxD.Kernels.Compiler
Assembly: DotBoxD.Kernels.Compiler.dll

Describes the result of reading a compiled artifact from the persistent cache.

public sealed record CompiledCacheLookup : IEquatable<CompiledCacheLookup>

objectCompiledCacheLookup

IEquatable<CompiledCacheLookup>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

A DotBoxD.Kernels.Compiler.CompiledCacheStatus.Hit result must include an artifact and cannot include an invalid reason. DotBoxD.Kernels.Compiler.CompiledCacheStatus.Miss and DotBoxD.Kernels.Compiler.CompiledCacheStatus.Invalid results cannot include an artifact. Only an invalid result can include an invalid reason, and invalid results must include one.

CompiledCacheLookup(CompiledCacheStatus, CompiledArtifact?, string?)

Section titled “ CompiledCacheLookup(CompiledCacheStatus, CompiledArtifact?, string?)”

Describes the result of reading a compiled artifact from the persistent cache.

public CompiledCacheLookup(CompiledCacheStatus Status, CompiledArtifact? Artifact, string? InvalidReason = null)

Status CompiledCacheStatus

Artifact CompiledArtifact?

InvalidReason string?

A DotBoxD.Kernels.Compiler.CompiledCacheStatus.Hit result must include an artifact and cannot include an invalid reason. DotBoxD.Kernels.Compiler.CompiledCacheStatus.Miss and DotBoxD.Kernels.Compiler.CompiledCacheStatus.Invalid results cannot include an artifact. Only an invalid result can include an invalid reason, and invalid results must include one.

Gets the cached artifact. Cache hits require an artifact; misses and invalid entries cannot include one.

public CompiledArtifact? Artifact { get; init; }

CompiledArtifact?

Gets the invalid-cache diagnostic. Only invalid entries can include this value, and they must include it.

public string? InvalidReason { get; init; }

string?

Gets the cache lookup state. Only hit, miss, and invalid are valid lookup states.

public CompiledCacheStatus Status { get; init; }

CompiledCacheStatus