| @objectstack/objectql | patch |
|---|---|
| @objectstack/rest | patch |
fix(objectql,rest): single-item meta reads must revalidate (no max-age=3600)
GET /api/v1/meta/object/:name (and the other single-item meta reads served by
the cached path) sent Cache-Control: public, max-age, max-age=3600. Two bugs:
-
Stale metadata for up to an hour. Object metadata is invalidated by publish, but a one-hour TTL let browsers (and any CDN/proxy) serve a stale schema without revalidating — e.g. the AI-build "New" create form kept rendering pre-publish fields until the TTL lapsed. The list endpoint
GET /api/v1/meta/objectis uncached, which is why list views updated but single-object reads didn't.getMetaItemCachednow returnsdirectives: ['private', 'no-cache']with nomaxAge, so the ETag validator (which already changes on publish) gates freshness: a cheap304when unchanged, fresh fields the instant a publish bumps the ETag.privatealso keeps per-tenant metadata out of shared caches. -
Malformed header. The directives array carried a bare
max-ageplaceholder and the REST layer appendedmax-age=3600from themaxAgefield, concatenating intopublic, max-age, max-age=3600. The header builder now strips the baremax-agetoken before appending the real value, so amaxAgeis emitted once as a well-formedmax-age=N.