New/Edit Caching Rule
The New/ Edit Caching Rule page is accessed from the Caching Rules page, by selecting a rule from the rules list, or clicking Add Rule or Edit , and is used to create a new rule or edit an existing rule.
This area is used to edit a rule's general properties:
- Rule Name - The unique name of the rule.
- Application - The rule group the rule belongs to (i.e., Global or an application).
- Cache Duration - The duration of the cache content (e.g., 120). After the set amount of seconds the cached content will be replaced by new content.
The Action bar is located in the top-right corner of the page:
Name |
Button |
Description |
Clear Cache |
|
Clears the rule cache. Only displayed for an existing rule. |
Duplicate Rule |
|
Creates a new rule based on the already existing rule. Only displayed for an existing rule. |
Save |
|
Saves the new or edited rule. |
Close |
|
Closes the page and displays the Caching Rules page. |
This tab contains the cache conditions, and is used to define the Web page you wish to cache by building a URL and adding cache conditions.
- Cache if URL - Entry fields for the URL of the page you wish to cache:
- Conditional drop-down menu - is exactly, matches RegEx, matches RegEx case-insensitive.
- http(s) - URL of the page you wish to cache.
- Cache if - Entry fields for conditions that can further pinpoint what to cache:
- Occurrence drop-down menu- at least one, all.
- Add Condition - Adds a cache condition:
- Super global variables drop-down menu:
- _GET - This refers to the parameters after the '?' in the URL. Use this condition to cache specific URLs, for example, caching a page with the URL: http://localhost:81/index.php?page=gallery. When the rule is applied, only the specified page is cached out of all the pages on http://localhost:81/index.php.
- _SERVER - This global variable can be used to determine server (Apache) parameters. The most common usage of SERVER variables is to use the headers that are sent in the request (i.e., variables that begin with HTTP - for example, HTTP_USER_AGENT), that can be used to define rules based on browser type.
- _SESSION - This global variable originates from an active session and can be used to cache (or specifically not cache) scripts if a specific variable exists (or has a value) in the active session.
- _COOKIE - This global variable stores information that is sent to the server from the browser. A cookie can be used to cache banners such as "Related Search" banners (which usually take time to compile), by displaying pre-cached banners according to the information in the cookies.
- Index field
- Conditional drop-down - equals, does not equal, matches, does not match, exists, does not exist.
- Variable
- Super global variables drop-down menu:
- Delete - Delete the caching condition.
Note:
You can only cache URLs that display static content with a long rendering time or dynamic content that you want to display statically according to time/parameters.
This tab is used to create a different cache version according to an additional parameter.
- Create a single cached page - Default caching setting.
- Create a separate cached page for each value of - If you want to manage a different cache version according to an additional parameter, you can choose to create a separate cached page for all the caching conditions (Entire Query String) or add one at a time each separate query string (Get, Server, Session or Cookie).
- Create Compressed Cache Copies -Disable the creation of a gzip-compressed version of each cached page as long as it is larger than 1KB. You should normally leave this option checked.