Blue Coat Systems Proxy SG Time Clock User Manual


 
ProxySG Content Policy Language Guide
306
Evaluation Order
CacheOS 4.x filter files have a different order of evaluation than CPL files.
A compiled filter file behaves as if it had a single
[Prefix] section, a single [Domain-Suffix]
section, and a single [Regular-Expression] section. The filter file is rewritten during file
compilation, as follows:
Any naked filter line that contains regular-expression metacharacters is moved into a virtual
[Regular-Expression] section.
Any remaining naked filter lines are moved into a virtual
[Prefix] section.
All explicit
[Prefix] sections are appended to the virtual [Prefix] section, in the order they are
written.
All explicit
[Domain-Suffix] sections are appended to the virtual [Domain-Suffix] section, in
the order they are written.
All explicit
[Regular-Expression] sections are appended to the virtual [Regular-Expression]
section, in the order they are written.
After all of this rewriting is performed, the filter file has the following order of evaluation:
1. The ALL statements.
2. The virtual
[Prefix] section. Within this section, it is the longest match that wins, not the first
match.
3. The virtual
[Domain-Suffix] section. Within this section, it is the longest match that wins, not the
first match.
4. The virtual
[Regular-Expression] section. Within this section, it is the first match that wins.
5. The
default_filter_properties statements.
Within the above order of evaluation, the first statement that matches wins, or determines how the
transaction is handled. At most, one statement is executed. The filter file policy is executed by both
proxy and cache transactions, so it is as if the filter file represented a single CPL
<Cache> layer.