Maintain
Cache & purge
Optimizing or pre-rendering a page is the expensive part; serving it again is nearly free. This page explains what is cached where, how that maps to your request quota, and every way to refresh a page when its content changes.
What is cached and for how long
| Action | Where | Default TTL | Key |
|---|---|---|---|
| Optimize | Wrenda’s edge cache (KV) | 1 hour — configurable per Template Optimization | URL + variant (optimize) + tenant |
| Pre-render | Wrenda’s edge cache (KV) | 24 hours | URL + variant (prerender) + tenant |
| Pass-through | Cloudflare CDN edge cache | Your CDN cache rules (see below) | URL (query string per rule) |
| Everything | The requester’s own cache | Cache-Control: public, max-age=… | — |
The cache key no longer includes the crawler's user agent: since per-crawler overrides were removed, the optimized output doesn't depend on which crawler asked, so GPTBot and ClaudeBot share one cached copy per URL. Optimize and pre-render copies are separate.
A blank pre-render (a page that rendered as an empty JavaScript shell) is deliberately not cached for the full 24 hours, so a transient origin hiccup doesn't poison a day of Googlebot visits.
CDN cache rules for pass-through
Cache Ops → CDN Rules controls edge and browser TTLs by MIME type and path glob for everything that passes through, with a cookie bypass so logged-in sessions are never cached. Initialize defaults creates:
| MIME / path | Edge TTL | Browser TTL |
|---|---|---|
image/* | 30 days | 7 days |
text/css | 7 days | 1 day |
application/javascript | 7 days | 1 day |
font/* | 30 days | 30 days |
application/json under /api/* | 1 minute | 0 |
Matching responses carry X-Cache-Rule and X-Edge-TTL. HTML that passes through (humans, or bots without an optimize / pre-render rule) is served from your origin with your own Cache-Control.
What counts as a request
Only real processing work counts toward your plan's monthly uncached requests. Cached responses and human visitors are always free.
When you reach your allowance your site never goes down and nothing extra is billed. Crawlers receive the cached optimized or pre-rendered copy where one exists and your original page otherwise; no new AI optimization or pre-rendering runs. Account admins get an email that day and a reminder every day after. If the plan still doesn't cover your usage after 30 days, every request passes straight through to your origin unmodified until you upgrade. Upgrading restores full service within minutes.
| Request | Counts? | Why |
|---|---|---|
| AI optimization (cache miss) | Yes | The full enrichment pipeline runs — structure, entity context, FAQs, schema. |
| Pre-render (cache miss) | Yes | A headless browser renders the page. Each unique URL render is one request. |
| Optimize or pre-render served from cache | No | Nothing is processed. |
| Pass-through (humans, static assets, unmatched bots) | No | Straight to your origin or the CDN edge. |
| Blocked | No | A 403 is returned without touching the origin. |
| Shadow / Paused mode | No | Everything is a pass-through. |
| Cache warming | Yes, per URL warmed | Warming does the same work as a first crawler hit. |
Plan allowances are on the Pricing page; current usage is under Billing.
Purging
Four ways to refresh, from manual to fully automatic.
Manual
Domains → your domain → Purge cache clears both the CDN edge cache for the hostname and Wrenda's optimize / pre-render cache for the domain. Enabling or disabling a Page Optimization also invalidates that page so the change is picked up on the next crawl.
The purge webhook
Each domain can expose a purge URL that your CMS or deploy pipeline calls. It needs no login — the URL contains a random 32-byte token that is compared in constant time.
- Enable
- Domain → Purge hook → Rotate (creates the token and shows the URL). Rotate again to invalidate an old URL; Disable turns the hook off.
- URL
https://api.wrenda.ai/domains/YOUR_DOMAIN_ID/purge-hook?token=YOUR_TOKEN- Method
- POST
- Body
{"urls": ["https://your-domain.com/page"]}to purge specific URLs, or no body to purge the whole domain.- Response
{"success": true, "data": {"purged": "domain" | "urls", "count": n}}- Rate limit
- 10 calls per minute per domain.
Vercel — call the hook at the end of your build command (Project → Settings → Build & Development Settings), with the URL in an environment variable:
next build && curl -s -X POST "$WRENDA_PURGE_URL"Netlify — add an outgoing webhook: Site configuration → Notifications → Deploy succeeded → Outgoing webhook, with the purge URL as the target. Netlify posts its own JSON payload, which Wrenda ignores, so this purges the whole domain on every successful deploy. Or, as with Vercel, append to the build command:
[build]
command = "npm run build && curl -s -X POST \"$WRENDA_PURGE_URL\""GitHub Actions — a step after your deploy job:
- name: Purge Wrenda cache
if: success()
run: curl -fsS -X POST "${{ secrets.WRENDA_PURGE_URL }}"Any CMS — purge just the page that changed:
curl -X POST "$WRENDA_PURGE_URL" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://your-domain.com/blog/new-post"]}'A WordPress must-use plugin that does this on publish is in Platforms → WordPress.
Sitemap watch
Once an hour Wrenda checks the sitemap of every verified, Active domain — /sitemap.xml by default, or the URL you set in the domain's sitemap field. It uses a conditional request where the server supports it and otherwise parses the newest <lastmod> (following up to ten child sitemaps of a sitemap index). When the sitemap is newer than last time, the domain's optimize / pre-render cache is purged and the new timestamp stored. Keep lastmod accurate and you get automatic freshness without a hook.
Cache warming
Cache Ops → Warming pre-populates the optimize and pre-render caches from a sitemap so the first real crawler visit is a cache hit. Jobs run manually or on a schedule and show a per-run history. Warm the pages you most want cited, not the whole site: each URL warmed is processed for real and counts as an uncached request, and a warmed copy expires like any other (1 hour / 24 hours) unless re-warmed.
curl -I -H "User-Agent: GPTBot/1.0" "https://your-domain.com/page"
# first request after purge: no X-Cache-Hit, higher X-Processing-Time
# second request: X-Cache-Hit present