Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

4.4.2. Rules Engine and Caching

Rules Engine Capabilities:
  • Match conditions (URL, headers, query strings, cookies)
  • Actions (route override, redirect, header modification)
  • Rule priority and chaining
Caching:
SettingPurpose
Query string cachingHow to handle query strings in cache keys
CompressionEnable/disable compression for cached content
Cache durationOverride origin cache headers
Cache behaviorFollow origin headers or override

Rules run in priority order, and every matching rule runs. This is unlike a routing rule, where the first match wins. A rules engine is a pipeline: an earlier rule can rewrite a header that a later rule then matches on, which is powerful and is also the usual reason a rule set behaves unexpectedly.

Query string handling defines the cache key, and this is the setting that most often causes either a poor hit rate or the wrong content being served. Ignoring query strings means ?id=1 and ?id=2 share one cached object — fast, and wrong for anything personalised. Including them means a tracking parameter appended by a campaign creates a brand-new cache entry for identical content.

💡 First Principle: Caching decisions are really key-design decisions. Ask what makes two requests the same response, and configure the key to match that.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•20 professional certifications