Cut the read-whole flag's copies in Resolved and Flatten: the staging half asks only the store's loaded view
Hand mutants dropping each copy survived the full Caching suite; the flag is read only through the store's Entries (RefuseUndeclared), which ToStoredDocument sets, so the cache's resolved variants and flattens were never asked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
10d012186a
commit
0c19d080b3
1 changed files with 3 additions and 3 deletions
|
|
@ -520,7 +520,8 @@ namespace GameCult.Caching
|
||||||
// it whole and owns it (CultDocumentRegistry.Owns). Set by ToStoredDocument from the schema comparison's ignored slots,
|
// it whole and owns it (CultDocumentRegistry.Owns). Set by ToStoredDocument from the schema comparison's ignored slots,
|
||||||
// before any variant override is shed. A record this cache constructed or wrote is stored under Descriptor's own id, which
|
// before any variant override is shed. A record this cache constructed or wrote is stored under Descriptor's own id, which
|
||||||
// the registry declares, so only a loaded record under another id is ever asked. The staging half asks it;
|
// the registry declares, so only a loaded record under another id is ever asked. The staging half asks it;
|
||||||
// ConditionsHold never reads it.
|
// ConditionsHold never reads it. Only the store's loaded view carries it: the cache's resolved copies and flattens are never
|
||||||
|
// asked.
|
||||||
internal bool StoredSchemaReadWhole { get; set; }
|
internal bool StoredSchemaReadWhole { get; set; }
|
||||||
|
|
||||||
// Names the bytes this record was read from or written as: the SHA-256 of its persisted encoding, set by the store that
|
// Names the bytes this record was read from or written as: the SHA-256 of its persisted encoding, set by the store that
|
||||||
|
|
@ -565,7 +566,7 @@ namespace GameCult.Caching
|
||||||
}
|
}
|
||||||
|
|
||||||
internal CultStoredDocument Resolved(object document, CultVariantDelta delta, bool idsInMemoryOnly, CultCodec codec) =>
|
internal CultStoredDocument Resolved(object document, CultVariantDelta delta, bool idsInMemoryOnly, CultCodec codec) =>
|
||||||
new(Key, StoredAt, Descriptor, delta, document, codec) { IdsInMemoryOnly = idsInMemoryOnly, StoredSchemaId = StoredSchemaId, StoredSchemaReadWhole = StoredSchemaReadWhole, StoredVersion = StoredVersion };
|
new(Key, StoredAt, Descriptor, delta, document, codec) { IdsInMemoryOnly = idsInMemoryOnly, StoredSchemaId = StoredSchemaId, StoredVersion = StoredVersion };
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class CultDocumentRegistry
|
public sealed class CultDocumentRegistry
|
||||||
|
|
@ -3318,7 +3319,6 @@ namespace GameCult.Caching
|
||||||
{
|
{
|
||||||
Flattens = true,
|
Flattens = true,
|
||||||
StoredSchemaId = variant.StoredSchemaId,
|
StoredSchemaId = variant.StoredSchemaId,
|
||||||
StoredSchemaReadWhole = variant.StoredSchemaReadWhole,
|
|
||||||
StoredVersion = variant.StoredVersion
|
StoredVersion = variant.StoredVersion
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue