Logic and Caching


Logic and Caching
The common use of the word logic says Something that makes sense. In mathematics, logic is the study of true and false. Logic uses operators
to combine combinations of trues and falses. Depending on the order of operators and variables (t/f), a final result of
True or False, Yes or No, 1 or zero can be established.
Operators:
The 3 most common operators are AND OR NOT.
AND
Say to get a true outcome you need two variables to be true. We call the
variables a and b. We can say outcome c needs a AND b. (True AND False) is
equivalent to False.
OR
If an outcome only requires one of a number of variables to be true, we can
say they are OR
ed. If we have 2 variables then if one other or both are true, the result is
true. Normal language or is actually an XOR, meaning one but only one.
NOT
Not simply negates the variable. NOT true is false, NOT false is true. Not is
sometimes called the complement.
XOR
This means one or the other but not both. T XOR T is F, T XOR F is T.
How is this related to WinGate?
WinGates
rules and caching are logic based. Look at the What to Purge Tab on the caching properties. You will see a Tree control. This is how
WinGate decides what to delete from the cache when it gets to big, or a manual purge
is initiated. There are two levels in this tree. The lower level are the
filters, shown as little books. These are ORed. Logically speaking if a file matches one of the filters, it will be
deleted. Therefore if you add more filters, you will delete more files. Any file has
only to match one filter to be deleted, it might match 1, 2, several or all of
the filters, but as long as it matched one, it will be deleted. Filters on
there own however do little. To give them structure, you have to add criteria.
These are displayed as document icons. Criteria are ANDed. This means that all the criteria in a filter must apply for a filter to
apply. So if a file does not match all the criteria of a filter is not deleted by
that filter. However, if it matches any filter, it will be deleted.
It works like this
Does a file match ALL the criteria of ANY filter. If yes then delete.