Optimize Caching

Configuring Cloudflare's cache for optimal performance.

Cache Rules (Recommended)

Use Cache Rules (replacing Page Rules) for fine-grained control:

{
  "description": "Cache static assets for 30 days",
  "expression": "http.request.uri.path contains \"/static/\"",
  "actions": {
    "cache_ttl": {
      "override_ttl": 2592000
    },
    "edge_ttl": {
      "override_ttl": 2592000
    }
  }
}

Best Practices

Related