DEVELOPER GUIDES & API

Edge Integration Guide

Configure origin shields, manage dynamic cache keys, and integrate programmatic purge triggers via RESTful APIs.

1. Origin Cache-Control Headers

PoleEdge respects RFC 9111 HTTP Caching semantics. Configure your backend webserver to return downstream TTL instructions:

# Sample Nginx Origin Configuration
location /static/ {
    expires 30d;
    add_header Cache-Control "public, max-age=86400, s-maxage=2592000, stale-while-revalidate=86400";
    add_header X-Edge-Tag "static-assets";
}

2. Programmatic Cache Invalidation

Trigger immediate cache evictions across all global PoPs via the Edge Purge API:

curl -X POST https://vpn.pole21.ru/api/v1/purge \
  -H "Authorization: Bearer edge_sec_live_9a48f2c01" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "vpn.pole21.ru",
    "paths": ["/assets/bundle.js", "/images/*"],
    "tags": ["frontend-v2"]
  }'

# Response:
{
  "status": "success",
  "purged_nodes": 142,
  "elapsed_ms": 118
}