Skip to content
AnswerWell geo Documentation

Research · 6 min read · Answerwell

Cache Rules Bot Fields, ASN Matching, and Ruleset TCP Conditions

What Cloudflare’s Rules changelog adds for Cache Rules, the Rules language, and Rulesets—and how to use and verify it.

This page summarizes Cloudflare documentation and changelog entries grouped around Rules: matching traffic with Rulesets, shaping cache behavior with Cache Rules, and expressing logic in the Rules language. The cluster is dominated by three product updates—bot management and ASN fields in Cache Rules, array and map helpers in rule expressions, and TCP-based match fields in Rulesets—plus pointers to the broader Rules reference and related products such as Transform Rules.

Rules on Cloudflare: Cache Rules, Rulesets, and the Rules language

Section titled “Rules on Cloudflare: Cache Rules, Rulesets, and the Rules language”

Cloudflare’s Rules surface covers several rule types that run at different phases of a request. Operators typically choose a rule product (for example Cache Rules or a Ruleset-backed firewall rule), write conditions in the shared Rules language, and attach actions. When behavior is wrong, the same platform offers troubleshooting and migration paths away from legacy Page Rules.

The central reference page states:

Refer to the following pages for more information about Rules:

Rules language Troubleshoot Rules Page Rules migration guide

— Cloudflare, Reference

The three changelog topics below extend what you can match on (bot signals, ASN, TCP properties) and how you can write conditions (array and map operations). They do not replace the Rules language reference; they add fields and functions you can use inside existing rule types.

Cache Rules: bot management fields and ASN support

Section titled “Cache Rules: bot management fields and ASN support”

Cache Rules control how Cloudflare caches responses (for example whether to cache, for how long, or how to vary cache keys). Teams often need different cache treatment for automated clients, verified bots, or traffic from specific networks.

Cloudflare announced bot management fields and ASN support for Cache Rules in the changelog entry Bot management fields and ASN support in Cache Rules. In the published excerpt bundled with that announcement, the product area is labeled Rules—meaning this change belongs to the Rules platform rather than a unrelated configuration surface.

When to match on bot management fields in Cache Rules

Section titled “When to match on bot management fields in Cache Rules”

Use bot-oriented match fields when cache policy should depend on whether traffic looks automated or on bot scores your Bot Management product exposes to Rules. Typical goals include caching more aggressively for verified crawlers, bypassing cache for suspicious automation, or varying cache keys so bot and browser traffic do not share incorrect entries.

An ASN (Autonomous System Number) identifies the network path a request came from. ASN conditions in Cache Rules help when policy should differ by upstream provider (for example a known hosting ASN, a partner network, or geography-correlated networks) without maintaining huge IP lists.

Common mistakes with bot and ASN cache rules

Section titled “Common mistakes with bot and ASN cache rules”
  • One cache rule for all bots — Good bots, monitor bots, and attack traffic need different cache and security posture; a single “bot” branch often over-caches or under-protects.
  • ASN instead of authentication — ASN tells you network origin, not user identity; do not treat ASN match alone as an access control substitute.
  • Ignoring cache key side effects — Changing who is cached under which key can make debuggers see stale content; test with cache-bypass headers before rolling out broadly.

Rules language: new functions for array and map operations

Section titled “Rules language: new functions for array and map operations”

Rule expressions sometimes need to inspect structured metadata: lists of tags, header maps, JSON-like collections, or multi-valued fields. Without array and map helpers, authors resort to long chains of primitive comparisons that are hard to read and easy to get wrong.

Cloudflare documented new functions for array and map operations in New functions for array and map operations. Like the Cache Rules announcement, the excerpt tagged the change under Rules, indicating additions to the shared expression layer used across Ruleset-backed products—not a single dashboard screen.

What array and map functions change for rule authors

Section titled “What array and map functions change for rule authors”

Array and map operations let conditions ask questions such as whether a value appears in a set, whether any element satisfies a predicate, or how to traverse key/value structure—depending on the exact functions Cloudflare ships in that release. The practical benefit is shorter, clearer rules when matching on multi-valued request attributes, JWT claims, custom headers, or catalog metadata.

How array and map functions interact with rule order

Section titled “How array and map functions interact with rule order”

Rules still evaluate in product-specific order (first match wins or phased evaluation, depending on the Ruleset). Richer functions do not change evaluation order; they only make each condition easier to express. Keep rules small and ordered: put the most selective conditions first so later rules are not evaluated unnecessarily.

Rulesets: new TCP-based fields for matching

Section titled “Rulesets: new TCP-based fields for matching”

Many Cloudflare policies run in Rulesets (WAF custom rules, rate limiting, transform logic, and similar). Traditionally, conditions leaned on HTTP-layer attributes. TCP-based fields expose connection characteristics that HTTP headers alone do not carry.

The changelog New TCP-based fields available in Rulesets announces TCP-oriented match capability for Rulesets; the bundled excerpt again categorizes the work under Rules.

TCP round-trip time (RTT) and related TCP properties can proxy for client distance, mobile vs fixed-line behavior, or congested paths. Operators use them to tier rate limits, challenge or log distant clients, or route traffic differently when latency crosses a threshold—always weighing false positives against operational goals.

TCP signals reflect the path to Cloudflare’s edge, not the full path to your origin. VPNs, proxies, and anycast can make RTT a noisy signal. Combine TCP conditions with HTTP signals (method, path, user agent, bot score) when making security decisions.

Section titled “Related Rules products: Transform Rules and static redirects”

Static redirect files on Cloudflare Pages and Workers static assets point operators toward Transform Rules for richer HTTP-level URL rewriting:

Transform Rules belong to the same Rules ecosystem as Cache Rules and Rulesets but solve URL and header transformation, not caching or L4-oriented TCP matching. Pick the product by phase of request handling: redirect/rewrite (Transform), cache policy (Cache Rules), security or traffic shaping (Rulesets).

Cloudflare groups the same announcements on paginated changelog listings. If you follow product-area feeds, you may see duplicate titles:

Topic Example listing URLs from this cluster
Bot management fields and ASN in Cache Rules Changelog 16, Application performance 2, Application security 3, Core platform 3, Network security 2, Rules product group
Array and map functions Changelog 35, Application performance 3, Application security 5, Core platform 6, Rules product group
TCP-based Ruleset fields Changelog 40, Application performance 3, Application security 7, Core platform 7, Network security 3, Rules product group

For authoritative wording and field names, use the dedicated posts linked in the sections above, not the index pages alone.

  1. Open the Rules reference and confirm which rule type you use (Cache Rules vs a specific Ruleset phase).

  2. Read the matching announcement—bot fields and ASN, array and map functions, or TCP-based Ruleset fields—and note any plan or field names required for your zone.

  3. In the Cloudflare dashboard, edit a draft rule using the new fields or functions; use Save as draft or a low-traffic hostname before enforcing.

  4. Send test requests that should and should not match (bot vs browser, ASN you control, pathologic RTT if applicable) and confirm the rule fires only on the intended traffic.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match Cloudflare’s documentation, or you need a clarification on a specific rule type, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about.