What to cache contents.gifprev1.gifnext1.gif

What to cache

Click on the Bitmap for help

wingate200000034.gif

In this example, Caching would not take place for users mary or bob. Note they are in the same filter!

Qbik recommend reading the advanced Appendix topic on Logic and Caching. To explain how the Caching works we have to understand AND OR, and NOT and how they are used in the rules logic in WinGate.

AND: If things are ANDed then they must all apply.

OR: If things are ORed then any may (but at least one must) apply

NOT: If a criterion is subjected to a NOT, then that criterion applies if it is NOT met

The logic in the caching works like this: filters are ORed, criteria are ANDed.

So if a request matches all the criteria of any of the filters then it will be cached. Otherwise it will not be cached.

A common trap is this. You want to say dont cache files for mary, or bob. You might think that to implement this, you would create two filters, one with a criterion Not User: Username equals mary, and one with a criterion Not User: Username equals bob

This would achieve absolutely nothing. bob would not make it through on the Not User: Username equals bob rule. However his username is not Mary, so he would make it through on the second rule.

Conversely mary would be denied on one, but make it through on the other, as no-one can have two usernames.

dont cache files for mary, or bob

What this really means is Cache files for NEITHER mary NOR bob.

To make this rule work, both these must hold:

a. Dont cache the file if bob requests it

b. Dont cache the file if mary requests it

So, the actual logic is: cache files that are NOT requested by bob, AND NOT requested by mary. This would result in a single filter with 2 criteria as demonstrated in the picture above.

Note:

Negative rules (i.e. caching depending on something not being met) become complex. The previous example shows that an entry may be denied in one filter, but allowed (either explicitly, or implicitly by not being denied) in another. If you want multiple filters, but disallow some specific criterion, make sure you include this disallowed criterion in every filter.

This applies to all rules in WinGate (including caching rules, and access rules).