Cache rules
A cache rule controls how the edge caches the responses for URLs that match its URL operator. It sets a TTL and, optionally, a set of per-URL location features that override your property-level defaults for the matching requests.
Fieldsβ
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | Display name. Max length 200. |
pattern | string | Yes | The match value. Max length 500. See match operators. |
matchType | integer | Yes | Equals=0, Contains=1, StartsWith=2, EndsWith=3, Regex=4. |
ttlSeconds | integer | Yes | Cache lifetime in seconds. Default 300 (5 minutes), minimum 0. |
order | integer | Yes | Lower runs first. See how rules work. |
isEnabled | boolean | Yes | Toggle without deleting. |
description | string | No | Optional free-text note. |
featuresJson | string (JSON) | No | Per-rule location features. Max length 5000. See Location features. |
ttlSeconds: 0 bypasses the cache for matching requests β nothing is stored and every request goes to the origin. Use it for paths that must never be shared between visitors, such as a cart or a checkout.
Changing a TTL to 0 does not remove what is already cached: entries stored under the previous TTL keep being served until they expire. Purge the property after the change.
When no rule matchesβ
A request that no cache rule matches is cached only if your origin says so:
| Origin response | What the CDN does |
|---|---|
Cache-Control: max-age=β¦, s-maxage=β¦ or Expires | Caches it for that long. |
Cache-Control: no-store, no-cache or private | Does not cache it. |
| No caching headers at all | Does not cache it β every request goes to the origin. |
To cache something your origin does not mark as cacheable, add a rule with a TTL. To use a property as a pure proxy that always goes to the origin, also delete the default static-assets rule below, or add a later rule matching / with TTL 0.
The default rule: Default β cache static assetsβ
Every new property is seeded at creation with one cache rule named Default β cache static assets, so static files are cached sensibly before you configure anything:
| Aspect | Value |
|---|---|
| Match | Regex on common static-file extensions: \.(css|js|jpg|jpeg|png|gif|webp|svg|ico|woff|woff2|ttf|otf|eot)$ |
| TTL | 604800 seconds (7 days) |
| Order | First (order 0) β every rule you add afterwards is evaluated later and therefore wins |
The rule is a normal cache rule β nothing about it is special or locked:
- Editable β change the TTL, pattern, or add location features like any rule you created yourself.
- Deletable β remove it if you want full manual control (for example on an API-only property where nothing should be cached by default).
- Overridable β because it is ordered first, rules you add yourself and rules created by a CMS preset come later and therefore take precedence for the URLs they match (the last matching rule wins). Applying a preset effectively supersedes it (presets ship their own static-assets rule with platform-tuned TTLs).
Use the Restore defaults action in the property's Rules tab. It re-creates the seeded default rule; your own rules are left untouched.
Exampleβ
Cache everything under /static/ for one hour. In the property's Rules tab, click Add cache rule and set:
- Pattern:
/static/β Starts with - TTL:
3600(1 hour)
Then expand Location Features (Optional) to fine-tune just these URLs (see below).
Location featuresβ
Location features override your property-level defaults for the URLs this rule matches. In the panel they live under a collapsible Location Features (Optional) panel β set only what you want to override.
| Option | Shape | Purpose |
|---|---|---|
bypass_cookies | array of cookie names | If any listed cookie is present on the request, the cache is bypassed (for example, a logged-in session cookie). Entries may use * as a wildcard β see below. |
cache_key | object | Customizes what goes into the cache key. |
cache_key.include_query_string | boolean | Include the query string in the cache key. |
cache_key.include_headers | array of header names | Add these request headers to the cache key (for example, Accept-Language). |
cache_key.include_cookies | array of cookie names | Add these cookies to the cache key. |
minification | object | Override minification for matching URLs (see note below). |
minification.html | css | js | boolean | Enable minification per content type. |
Turn minification on in Delivery β Minification, where it applies to the whole
property. It is available on every paid plan (not on Seed): on Seed the API refuses a
setting or a rule that turns it on, and a downgrade to Seed asks you to turn it off first. The minification location feature above only exists to override that
default for specific URLs β for example, to disable it under /admin/. A rule that
sets it wins over the property setting for the URLs it matches.
Minification is conservative: it strips comments and redundant whitespace but never rewrites your code, and JavaScript containing template literals is passed through untouched. It runs only on a cache MISS and the result is cached under its own key variant, so purge the property after changing it.
Wildcardsβ
A bypass_cookies entry can be an exact cookie name or a pattern where * matches any run of characters. Matching is case-insensitive.
| Entry | Matches |
|---|---|
wordpress_logged_in_ | that cookie name, exactly |
wp_* | wp_woocommerce_session, wp_customer, β¦ |
*_session | wp_woocommerce_session, laravel_session, β¦ |
* | any cookie at all β the cache is bypassed as soon as the request carries one |
* will collapse your hit rateAnalytics and consent cookies (_ga, _fbp, a cookie-banner flagβ¦) are set on nearly every returning visitor, so * sends nearly all of your traffic to the origin. It is the right tool for a narrow path that must never be shared β a cart, a checkout, an account area β and the wrong one for a whole property.
Listing your CMS session cookie (such as wordpress_logged_in) under bypass_cookies keeps anonymous visitors on the fast cached path while logged-in users always see fresh, personalized pages. See the WordPress examples for a full setup.
Paradarum also detects well-known CMS and framework session cookies automatically (WordPress, WooCommerce, PrestaShop, Drupal, Joomla, Moodle, Laravel, Django, Ghost and Rails) and bypasses the cache for those requests β but only for dynamic content. Static assets (JS, CSS, images, fonts, media and downloads) are cached regardless of cookies, since they are identical for logged-in and anonymous visitors. Generic anonymous-visitor cookies such as PHPSESSID, JSESSIONID or CSRF tokens never trigger a bypass on their own; if your site personalizes pages using one of those, add it explicitly under bypass_cookies.
Next stepsβ
- WordPress rule examples β real cache-rule setups including bypass cookies.
- Match operators β pick the right operator for your URLs.
- API reference β full request and response schemas.