HTTP · rule
route.cache_invalid
Route's cache: isn't immutable, or it keeps an answer a public cache may not hold.
Area 7, HTTP; not declinable; the next step is usually the agent's.
cache: immutable says an answer never changes, so any cache on the way may
keep it for a year. It goes on a GET anyone may call, answering 200, and what
the route runs can't give personal data, since no erasure reaches a public
cache: a field marked personal:, or a standard type that is personal data
whatever holds it, such as PhoneNumber or Email, on a field with no mark or as the output's
own type (What the compiler checks).
immutable is the one thing cache: says.
Here the route needs a signed-in caller, and a public cache would hand what that caller was sent to anyone who asked:
type Note = Text { max_length: 200}type NoteView = Output { note: Note}action a_note() -> NoteView { return NoteView { note: "Never changes." }}routes Notes { prefix: /notes GET / { output: NoteView cache: immutable run: a_note() }}
error GET /notes needs a signed-in caller, but says cache: immutable
--> main.jadpo:20:9
|20 | cache: immutable | ^^^^^ a public cache would hand it to anyone
- reason
cache: immutablepromises the answer never changes, so any cache on the way may keep it for a year: aGETanyone may call, answering 200, with no personal data in it, markedpersonal:or of a standard type that is, since no erasure reaches a public cache.- next
- Remove
cache:, or sayauthentication: RouteAuthentication.none(agent) - rule
- route.
cache_ invalid - help
- https://jadpo.
dev/docs/errors/route. cache_ invalid
Say who may call it, or don't let caches keep it:
GET / { authentication: RouteAuthentication.none output: NoteView cache: immutable run: a_note()}
Markdown for agents: /docs/errors/route.cache_invalid.md.Built from Jadpo main at 0e6fe62.