Rendered document cache for revisions
Apiome now generates a version's OpenAPI document once and keeps it in the document store. Requests for an unchanged version read the stored bytes and no longer read the version's classes, properties and paths.
/v1/schemais served from the store: the first request generates the document and stores it. Later requests stream the stored bytes. The document itself is unchanged.ETagandIf-None-Match: everyGET /v1/schema/{tenant}/{project}/{version}response hasETag: "<sha256>". Send it back inIf-None-Matchto get304 Not Modifiedwith no body.- Edits are picked up at once: an edit to the version, or to its project's slug, description or metadata, makes the next request generate a new document.
- Publishing prepares the document: a published version's document is generated and stored at publish, so its first reader gets stored bytes.
- Frozen schemas move to the store: a newly frozen version's bytes are a store object. With
s3orfilesystemthe database row keeps only the SHA-256, size and counts. Versions frozen earlier still work. - A faster first render: the properties of all classes are loaded in one query, not one per class.
Migration V404 runs with the upgrade and changes no rows. See Rendered documents and Freeze a version's schema.
