How to override cache for your Edgee project
Force Edgee to cache specific paths, whether the cache is enabled or not. These rules take precedence over the default cache settings and will help you improve performance.
Cache rules allow you to define how requests are cached based on their path and request/response headers. Each rule consists of a path pattern and caching behavior. Rules are evaluated in order, with the first matching rule being applied. If no rules match, the default caching behavior is used.
Browse to your project’s Performance panel and select Override cache.
From here, you can add cache rules to your project.
How to add a new override cache rule. Click on the image to zoom in.
Rules are evaluated in the following order:
rank
value (lower ranks are evaluated first)Rules can match paths in two ways:
Regex
is false, the rule’s path must exactly match the request URL pathRegex
is true, the rule’s path is treated as a regular expression patternRegex on/off
Rules can include conditions that must be met for the rule to apply:
When a rule matches, it can control caching in several ways:
Set-Cookie
headers from cached responsesCache control
Edgee adds the following headers to responses to indicate caching behavior:
x-edgee-override-cache: yes
- Response was cached according to the rulex-edgee-override-cache: no(set-cookie-present)
- Response wasn’t cached due to Set-Cookie headersx-edgee-override-cache: no(resp-condition-not-met)
- Response conditions weren’t metx-edgee-override-cache: no(req-condition-not-met)
- Request conditions weren’t metx-edgee-override-cache: no(pass)
- Rule specified pass-throughCache rule example
This example:
/static/
content-type
header with value “text/css”