Publishing
Draft / publish workflow, autosave, cache invalidation.
Every page has two content states: a draft (your working copy) and a published version (what visitors see). Changes you make in the Puck editor affect the draft only; visitors see the published version until you explicitly publish.
Autosave
Every edit you make in the visual editor is autosaved immediately. There is no manual save button and no risk of losing work by navigating away.
HTML pages do not autosave. You must click Save manually in the HTML editor.
Publishing a page
Click Publish in the page editor toolbar. Publishing promotes your draft to the live version, updates the page status to PUBLISHED, and writes the content to the cache. From this point on, visitors requesting the page receive the newly published content.
Cache behavior
The storefront renderer checks the cache before reading the database:
- On each request, the renderer looks up the page by slug in the cache.
- Cache hit — the cached published content is rendered and returned. No database query.
- Cache miss — the renderer reads the published page content from the database, renders the page, writes the result to the cache, and returns it.
The cache TTL is configurable. When a page is published, the cache entry is written immediately, so the new content is available to the next request without waiting for the previous TTL to expire.
Cache adapters
Three adapters are supported, selected by your deployment configuration:
| Adapter | Use case |
|---|---|
| Redis | Recommended for production Node.js deployments |
| Cloudflare KV | Used when deployed to Cloudflare Workers |
| In-memory | Development and testing only; does not persist across restarts |
The adapter is selected via environment variables or AppConfig. See the deployment documentation for the specific keys.
Rollback
Autonnel keeps exactly one draft and one published version per page. There is no version history. Publishing overwrites the previous published version permanently; the previous draft state is lost on the next autosave. If you need to preserve a specific version, duplicate the page before making changes.
Draft / published divergence
After publishing, you can continue editing the draft freely. The published version remains unchanged until you publish again. This lets you work on the next iteration of a page while the current version stays live for visitors.
The page editor shows a visual indicator when the draft differs from the published version.
Caveats
- Long-running drafts. If you edit a page over many sessions without publishing, autosaved changes accumulate. This is generally harmless but can make the diff between draft and published harder to review.
- Multi-tab race condition. If you have the same page open in multiple browser tabs and publish from both, the last write wins. The earlier publish is silently overwritten. Avoid editing the same page in multiple tabs simultaneously.
- Cache adapter in Workers. Cloudflare KV has eventual consistency. In rare cases, a request served from a different edge node may briefly return stale content immediately after publishing. This resolves within seconds.
- HTML pages. HTML page content is not cached through the same mechanism as visual-editor pages. Check your deployment adapter’s documentation for HTML page caching behavior.
Related
- Puck editor — editing Puck-based pages
- Storage settings — cache adapter configuration