Expand description
One schema snapshot per request.
Upstream threads a validSchemaController down through every controller entry point
(DatabaseController.js:553, :843, :906, :1407) so that one request cannot evaluate half
its work under one schema and half under another. A batch that saw two schemas mid-flight would
decide what a caller may write and what a caller may see under two different rule sets, and the
second half would carry no error.
It is also what makes include and $relatedTo expressible at all: both need the schema of a
class other than the one being queried, and a per-class fetch at the point of use would be a
second snapshot.
No caching here. 0.2.0 reloads every schema on every request, which is correct and slow. A cache is the obvious next step and deliberately not taken yet: a schema carries the CLP, so the staleness window of a schema cache is the window in which a revoked permission is still honored. That makes it an authorization decision rather than a tuning knob, and it wants to be designed as one rather than added for the throughput.
Structsยง
- Schema
Snapshot - Every class schema, as of one point in time.