Edit Rule (Caching)
The Edit Rule page is accessed from Rule
Management | Caching, by clicking or by clicking
Edit next to a specific rule.
Caching Information
Rule Name -
The unique name you give the rule. This name appears in the list in
Rule Management | Caching.
Caching Conditions
Define a Web page to cache by building the URL in the entry fields.
Use the URL of the page you want to cache and define how long to cache
the page and the caching format.
You can also add conditions that can further pinpoint what to cache.
You can choose to cache when "all
of the following are true" - i.e. all the conditions occur
or when "at least one is true"
- i.e. trigger caching when at least one of the conditions occur.
The conditions that can be applied
to a rule are:
- 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.
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.
Multiple Versions of Cached Pages
- Create Compressed Cache Copies
- This option allows you to 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.
- 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).
Duration of Caching
Define the cache's lifetime
- Lifetime - The duration
of the cache content, after the set amount of seconds the cached content
will be replaced by new content.
For more information and rule examples see: .
Note:
URL caching conditions can be defined using Perl-Compatible
Regular Expressions (PCRE). The pattern syntax is the same as the syntax
used by PHP's preg_match() and other preg_* functions. For more information
on the PCRE syntax, see http://devzone.zend.com/manual/reference.pcre.pattern.syntax.html.