Cloudflare Edge CDN Delivery & Cache Purging

How SmallPict delivers optimized images through global Cloudflare Edge Points of Presence with instant cache invalidation.

Cloudflare Edge CDN Delivery & Cache Purging

SmallPict pairs cloud optimization with a globally distributed Content Delivery Network (CDN) powered by Cloudflare Enterprise.


🌍 How Edge Delivery Works

When a visitor requests an image from your site:

  1. Nearest Edge Node: The request is routed to the closest Cloudflare Point of Presence (PoP) among 300+ cities worldwide.
  2. Edge Cache Hit (< 15ms): If the image is cached, it is delivered immediately from SSD edge cache with zero origin server load.
  3. Edge Cache Miss: The CDN fetches the compressed WebP/AVIF file from SmallPict AWS S3 storage, caches it at the edge, and delivers it to the visitor.

🧹 Automatic & Manual Cache Invalidation

Keeping your edge cache synchronized with your content is critical. SmallPict provides automated cache invalidation:

1. Automatic Invalidation on Media Updates

  • When an image attachment is edited, cropped, or replaced in WordPress, the plugin dispatches an automated purge request (POST /v1/plugin/purge) to Cloudflare edge nodes within milliseconds.
  • When an attachment is deleted from the media library, the CDN cache for all thumbnail sizes is purged automatically.

2. Manual URL Invalidation via REST API & SDK

You can trigger explicit CDN purges programmatically:

curl -X POST https://api.smallpict.app/v1/purge \
  -H "X-API-Key: sp_live_9a8b7c6d5e4f3a..." \
  -H "X-Timestamp: 1716301234" \
  -H "X-Signature: 3a9f8b2c4d6e..." \
  -H "Content-Type: application/json" \
  -d '{
    "purge_type": "url",
    "urls": [
      "https://cdn.smallpict.app/opt/hero.avif",
      "https://cdn.smallpict.app/opt/hero-thumb.webp"
    ]
  }'

🏢 Managed CDN vs Bring Your Own Key (BYOK)

SmallPict supports two CDN operational models:

1. Managed SmallPict CDN (Included in WordPress Plans & API Momentum)

  • Zero Config: All CDN routing, SSL certificates, HTTP/3, and caching headers are fully managed by SmallPict.
  • Global Anycast Routing: Automatic failover across multi-region edge nodes.

2. Bring Your Own CDN (BYOK) (Ignite & Velocity Plans)

  • Connect your own Cloudflare or AWS CloudFront account via API token.
  • Retain custom WAF firewall rules, page rules, and custom domain names.
  • Bandwidth is billed directly by your CDN provider, giving you full routing ownership.