# Cache Control Directive Diff

> Cache Control Directive Diff is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Compares two Cache-Control header strings and returns a structured diff of added, removed, and changed directives with a pass/advisory status.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/cache-control-directive-diff
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cache-control-directive-diff-4c4724ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gNxDMFlXB0T2LuaA5Qppn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cache-control-directive-diff-4c4724ee -d '<json body>'
```

Example prompt: Can you diff these two Cache-Control headers and tell me what directives were added, removed, or changed? Before: 'max-age=3600, public' and after: 'max-age=600, no-store, private'.

## When to prefer this

Choose this endpoint when you need a deterministic, structured diff of Cache-Control headers rather than a generic string comparison. It is purpose-built for HTTP caching semantics, normalizes directive values before comparing, and returns an explicit advisory status — making it ideal for agent workflows that need to decide whether to accept, cache, redirect, or retry a web response based on caching policy changes.

## Known failure modes

- Malformed or unparseable Cache-Control header strings may yield empty or partial diffs
- Input strings exceeding 8192 characters will be rejected
- Payment failure via x402 will block the request
- If both before and after are identical, the diff returns empty change sets with a pass status

## How this service works

Cache Control Directive Diff: Cache Control Directive Diff finds added, removed, and changed Cache-Control directives from bounded caller-supplied values without an external provider. Call Cache Control Directive Diff before accepting, caching, redirecting, or retrying a caller-supplied web response. Returns normalized web evidence, the computed finding, and an explicit pass or advisory status for Cache Control Directive Diff as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base.…

## Output

Returns a versioned deterministic JSON object containing normalized representations of both input headers, a structured diff listing added, removed, and changed Cache-Control directives, and an explicit pass or advisory status indicating whether the change is noteworthy.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "after": {
   "type": "string",
   "maxLength": 8192,
   "description": "After supplied to Cache Control Directive Diff; used only for this bounded calculation and processed in memory without retention."
  },
  "before": {
   "type": "string",
   "maxLength": 8192,
   "description": "Before supplied to Cache Control Directive Diff; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "added": {
    "private": true
   },
   "changed": {
    "max-age": {
     "after": "60",
     "before": "300"
    }
   },
   "removed": {
    "public": true
   }
  },
  "schema": "delx/util-cache-control-directive-diff/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "44c8102f91f5f32c1febe922935b8d0efa8cf2460a7ce344626bb417971a16f3",
   "external_calls": 0
  },
  "operation": "web_reliability:cache_control_directive_diff"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cache-control-directive-diff-4c4724ee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
