Skip to content
  • There are no suggestions because the search field is empty.

Domain Manager: Domain and Pattern-Based Cache Expiration

Instead of running a one-size-fits-all cache schedule, define expiration settings that work at every level of your site. Start broad with Domain-Level Cache Expiration to set a default recache policy for an entire domain, then fine-tune specific URL paths using Pattern-Based Cache Expiration. It’s like giving your site both a company-wide strategy and a local manager for every department.

 

This feature is only available in our Pro and Enterprise plans.

Domain-Level Cache Expiration

When you want to think bigger than URL patterns, Domain-Level Cache Expiration steps in. Instead of targeting individual routes, this feature lets you assign a single expiration policy across an entire domain. It’s the “set it and forget it” option for teams that want broad cache governance without juggling dozens of micro-rules. Think of it as the executive order of cache policies, giving everything under your domain a consistent refresh cadence.

What Is Domain-Level Cache Expiration?

Domain-level expiration defines how often any page under a domain is recached, regardless of path. It acts as a safety net for when no pattern rules apply. This keeps your content lifecycle predictable and ensures no domain goes stale, even if you never define a single pattern rule.

You might use this when:

  • You’re onboarding a new site and want a default cache policy while patterns are still being built out.

  • You manage domains with stable content where global intervals make more sense.


How It Works

When a URL request is evaluated, our system checks applicable expiration layers in the following order:

  1. Rule-Based Expiration – The most specific layer. If a URL matches a pattern rule, that setting wins every time.

  2. Domain-Level Expiration – Applies when there is no matching rule for the requested URL.

  3. Account-Level Expiration – The global default across all your domains, used as a fallback when neither rules nor domain policies exist.

This hierarchy ensures your most granular rules always take precedence while broader policies fill in the gaps. In other words, your cache stays fresh where it matters and efficient everywhere else.

Example Scenarios

  • New Domain Rollout: Apply a 24-hour expiration to an entire domain until you define pattern rules.

  • Simple Static Site: Use a 7-day expiration across the domain for hands-off cache control.

  • Mixed Content: Combine short-lived pattern rules for dynamic paths (for example /blog/*) with a longer domain-level expiration for everything else.

How to set Domain level Cache Expiration

Step 1: Navigate to Domain Manager

  1. Log into your dashboard and open Domain Manager.



  2. Select your target domain. (Eye Icon)
  3. Scroll to Scheduler Settings.

Step 2: Set the preferred Cache Expiration

  1. Move the slider to your preferred value
  2. Click on Update

 


Pattern-Based Cache Expiration

Pattern-based cache expiration lets you define how often specific sections of your site should be recached. It’s ideal for balancing freshness and efficiency — shorter durations for fast-changing content, longer durations for static areas.

Instead of over-caching evergreen content or under-caching news articles, pattern-based rules help align cache freshness with your business priorities.

How to Create a Rule

Step 1: Navigate to Domain Manager

  1. Log into your dashboard and open Domain Manager.

  2. Select your target domain. (Eye Icon)

  3. Scroll to Scheduler Settings.

  4. Click Add Rule. A modal appears, add your pattern.

 

Step 2: Define Your URL Pattern

In the Rule field, enter the URL pattern you want to match. You have two options:

Option 1: Simple Substring Match
Enter a substring that appears in your target URLs. This method uses a “contains” match.

 

Examples:

  • /products/ — matches any URL containing /products/

  • /blog/2024/ — matches all posts from 2024

  • ?category=electronics — matches URLs with that query parameter

Option 2: Wildcard Pattern
Use an asterisk (*) as a wildcard to match any characters in the path.

Examples:

  • /blog/*/comments — matches all comment pages under blog posts

  • /products/*/reviews — matches all product review pages

     

Wildcard Tip: The * character matches any sequence (including none) and is converted into a regular expression. If you want to match anywhere in the URL, start your pattern with *.

Step 3: Set Cache Expiration

Use the slider to select how frequently the matched URLs should be recached. Most plans allow settings from 6 hours to 30 days.

  • Slide left for shorter, fresher intervals.

  • Slide right for longer, more efficient caching.

 

Step 4: Review and Save

When you save:

  • The system counts how many URLs match your pattern.

  • It validates that the rule doesn’t affect more than 50% of your domain’s URLs.

  • It checks for existing rules and plan limits.

If validation fails, you might see:

  • "Setting affects more than 50% of urls"
      

  • "Max rules per domain is already reached"

  • "Setting with the same rule already exists"

 


Understanding the Scheduler Settings Table

After adding rules, you’ll see them listed in a table for easy management.

Column Description
Rule The URL pattern you defined
Cache Expiration The recache interval selected
Number of Pages How many cached URLs currently match this pattern
Actions Delete the rule when it’s no longer needed

Technical Details

Pattern Matching Logic

  • Wildcard rules (*) are converted to regular expressions where * becomes .*.

  • Non-wildcard rules use SQL LIKE with % on both sides.

    • Example: /products/ becomes %/products/%.

Validation Rules

  • Maximum URL Percentage: A rule cannot affect more than 50% of your domain’s cached URLs.

  • Maximum Rules per Domain: Limited by your plan tier. Pro plan 5 rules. Enterprise plan 10 rules.

  • No Duplicate Rules: Each pattern must be unique per domain.

Use Cases and Best Practices

Use Case 1: Frequent Blog Updates
Keep your news fresh by setting /blog/* to recache every 12 hours.

Use Case 2: Product Inventory
Use /products/ with a 6-hour expiration to keep pricing accurate without overspending on renders.

Use Case 3: Seasonal Content
For temporary promotions, use /holiday-sale-2024/ with a 2-hour interval, then delete it when the campaign ends.

Best Practices

  • Start Specific: Begin with narrow patterns, then broaden if needed.

  • Monitor Impact: Check the “Number of Pages” count.

  • Watch Your Render Budget: Shorter durations increase render frequency.

  • Test Patterns: Use a regex tester to confirm your matches.

  • Avoid Over-Segmenting: Too many rules can become difficult to manage.

How It Affects Your Cache

Recache Behavior
When multiple rules match a URL, the most specific rule applies. If no pattern matches, the default domain or account-level setting takes over.

Render Counter Impact
Shorter recache intervals increase render counts.
For example, 100 URLs with a 1 day expiration will recache twice daily — about 3,000 renders per month. Align your settings with your plan to stay on budget.

Troubleshooting

Issue Cause Solution
“Setting affects more than 50% of URLs” Rule too broad Make it more specific or split it into smaller rules
Pattern not matching expected URLs Case sensitivity or incorrect pattern Verify capitalization and wildcard placement
“Add Rule” button disabled Reached plan limit or missing permissions Upgrade your plan or contact support

 

Permissions

Role View Rules Create Rules Delete Rules
Owner/Admin
Member
Billing Manager
Guest
 

Related Features

Was this article helpful?