Edge caching for every page
Each page and route on Tessryx has a cache time. Within it, visitors get a copy from the network edge near them and the page's workflow doesn't run. Those visits are quick and don't use credits, since credits are only spent when a page is actually built.
The same setting decides how quickly an edit shows up. Nothing clears a cached copy early, not even publishing, so a page cached for ten minutes can take ten minutes to change. Keep it short while you're working on a page, then raise it.
Try it
A traffic spike against the edge cache
cache.s_maxage_seconds
cache.stale_while_revalidate_seconds
Cache-Control: public, max-age=30, s-maxage=300, stale-while-revalidate=3600
VisitorsVirginia
Virginia
Nothing cached
VisitorsFrankfurt
Frankfurt
Nothing cached
VisitorsSingapore
Singapore
Nothing cached
Workflow
blog/home@published
0
builds
- Visits
- 0
- From the edge
- 0
- Workflow runs
- 0
- Credits
- 0
- With no cache
- 0
- credits
00:00:00 · v1 published
- Press play, then try a spike.
How it works
- 01
Traffic spikes
Five hundred people opening the same page in the same minute means a build at each edge location they come through, and a copy for everyone else.
- 02
After the cache time runs out
With a serve-stale window, the page keeps answering with the last copy while a fresh one builds.
Questions
Is there a purge button?
There isn't. A change shows once the cached copy runs out, so pages that are still changing do better with short cache times.
What about pages behind a sign-in?
They're only cached in the visitor's own browser. A signed-in page is never stored at the edge, where it could be handed to someone else.
Under the hood
The technical details
- cache.s_maxage_seconds
- Honored exactly. 0 or unset means no caching and a run on every request.
- Cache-Control
- public, max-age=min(30, s), s-maxage=s, plus stale-while-revalidate when set. Each host keeps its own copy.
- no purge
- Publishing does not clear cached copies; a change appears when the cached one expires.
- exceptions
- POSTs are no-store and signed-in pages are browser-only (private). 404s are cached for 60 seconds.
Related features
Stale-while-revalidate for expired pages
When a cached page expires, visitors keep getting the last copy straight away while a new one builds in the background.
Credits for runs
Tessryx charges for the work your logic does, in credits. A typical page build is 1 credit, and a longer job costs 1 credit per 10 seconds, whatever started it.
Pages and API routes
Anything your AI builds can go live at a web address. Some addresses are pages people open; others are routes that a page's own scripts call to load or save things.
Dynamic routes with URL parameters
One page design can serve every post in a blog by reading the post's name from the address. An address that matches nothing gets an ordinary "page not found."