Cross-Tenant API Response Cache & 100% Repeat-Margin Economics
Autonomous agents repeatedly request the same vector embeddings, corporate domain records, pricing pages, and search queries. FuelRouter's cross-tenant ArchiveCache serves verified historical payloads in milliseconds with $0 upstream cost and 100% repeat gross margin.
Per-Pool Adaptive TTL & Cross-Tenant Margin Physics
| Pool ID | Default TTL | Max Adaptive TTL | New-Tenant Hit Toll | Same-Tenant Repeat Toll | Upstream Cost on Hit | Gross Margin |
|---|---|---|---|---|---|---|
| ai_chat_json | 7d (604,800s) | 30d (2,592,000s) | $0.010 (100%) | $0.0010 (10%) | $0.00 | 100.0% |
| embeddings_rerank | 14d (1,209,600s) | 30d (2,592,000s) | $0.004 (100%) | $0.0004 (10%) | $0.00 | 100.0% |
| web_search | 7d (604,800s) | 21d (1,814,400s) | $0.008 (100%) | $0.0008 (10%) | $0.00 | 100.0% |
| clean_scrape_extract | 7d (604,800s) | 21d (1,814,400s) | $0.012 (100%) | $0.0012 (10%) | $0.00 | 100.0% |
| b2b_domain_dns_enrichment | 14d (1,209,600s) | 30d (2,592,000s) | $0.020 (100%) | $0.0020 (10%) | $0.00 | 100.0% |
Canonical SHA-256 Key Normalization
Before querying SQLite WAL ArchiveCache, FuelRouter normalizes inputs by sorting keys deterministically, trimming whitespace, and lowercasing identity fields (domain, email, host, hostname). Two agents submitting FastMesh.DEV and fastmesh.dev collide onto the exact same SHA-256 key.
Because only public deterministic capability outputs are keyed by canonical inputs, cross-tenant deduplication eliminates redundant upstream traffic without exposing one tenant's private headers or credentials to another.
Adaptive TTL Expansion (1.5x) and Drift Contraction (0.5x)
Static short caches throw away margin on stable entities like corporate DNS records or dense vector embeddings, while overly long static TTLs serve stale pricing pages.
FuelRouter starts each record at its pool default (7d or 14d). When a force_refresh or expired re-fetch returns identical content, TTL expands by 1.5x up to the pool cap (21d or 30d). When content drifts, TTL contracts by 0.5x down to the 7d floor.
Quote a Predicted Cache Hit Before Dispatch ($0 Dry Run)
curl -fsSL -X POST "https://fuelrouter.fastmesh.dev/v1/router/quote" \
-H "Content-Type: application/json" \
-d '{
"pool_id": "b2b_domain_dns_enrichment",
"tenant_id": "tenant_beta",
"inputs": {"domain": "fastmesh.dev", "include_dns": true},
"force_refresh": false
}'
Cache Integrity & Admission Invariants
- Verified non-empty payloads only: failed status codes and fake-200 shells are strictly barred from cache admission.
- Explicit empty invalidation: if a live refresh confirms an entity no longer exists, stale cache records are purged.
- Same-tenant 90% discount: repeat hits from the original tenant bill only 10% (repeat_price_percent: 10) at 100% gross margin.
- Bypass on demand: passing force_refresh: true skips the archive read path and atomically refreshes the cached record on success.
Frequently Asked Technical Questions
Does a cache hit consume any free-tier upstream RPM or RPD quota?
No. Cache hits perform zero outbound upstream requests, preserving 100% of free-tier quota for genuinely new queries.
How much does a same-tenant repeat hit cost compared to a live miss?
Same-tenant repeat hits bill 10% of the pool outcome price (for example, $0.0004 instead of $0.004 on embeddings_rerank).
Can an upstream 503 error overwrite a valid cached record?
Never. Admission rules strictly prohibit upstream failures from mutating or evicting previously verified archive entries.
Live Try-Now Console & Machine Discovery
Test failover routing, dry-run quotes, and circuit breaker metrics on the live gateway or connect via JSON-RPC 2.0 MCP.
Related FuelRouter Architecture Guides
- Zero-Secret Credential Proxy for Autonomous AI Agents — zero-secret credential proxy for AI agents
- Free-Tier API Quota Rotation Architecture Across 3 Rolling Windows — free tier API quota rotation architecture
- AI Chat & Structured JSON Inference Failover Pool (ai_chat_json) — structured JSON LLM inference failover pool