4.6. HTTP cache

Using cache to access Web pages that are opened repeatedly reduces Internet traffic. Downloaded files are saved to the harddisc of the WinRoute host so that it is not necessary to download them from the Web server again later.

All objects are stored in cache for a certain time only (Time To LiveTTL). This time defines whether checks for the most recent versions of the particular objects will be performed upon a new request of the page. The required object will be found in cache unless the TTL timeout has expired. If it has expired, a check for a new update of the object will be performed. This ensures continuous update of objects that are stored in the cache.

The cache can be used either for direct access or for access via the proxy server. If you use direct access, the HTTP protocol inspector must be applied to permitted TCP port 80 and 443 traffic. (refer to chapters 5.2 and 8.3).

To set HTTP cache parameters go to the Cache tab in Configuration / Content Filtering / HTTP Policy.

Enable cache on transparent proxy

This option enables cache for HTTP traffic that uses the HTTP protocol inspector (direct access to the Internet)

Enable cache on proxy server

Enables the cache for objects downloaded via WinRoute's proxy server (see chapter 4.5)

HTTP protocol TTL

Default time of object validity within the cache. This time is used when:

  • TTL of a particular object is not defined (to define TTL use the URL specific settings button —see below)

  • TTL defined by the Web server is not accepted (the Use server supplied Time-To-Live entry)

Cache directory

Directory that will be used to store downloaded objects. The cache file under the directory where WinRoute is installed is used by default.

Warning: Changes in this entry will not be accepted unless the WinRoute Firewall Engine is restarted.

Cache size

Size of the cache file on the disc. Maximal size of this file is determined by file system: FAT162GB, 4GB are allowed for other file systems.

Note: If 98 percent of the cache is full, a so called cleaning will be run — this function will remove all objects with expired TTL. If no objects are deleted successfully, no other objects can be stored into the cache unless there is more free space on the disc (made by further cleaning or by manual removal).

Memory cache size

Maximal memory cache size in the main storage. This cache is used especially to accelerate records to the cache on the disc.

If the value is too high the host's performance can be affected negatively (cache size should not exceed 10 per cent of the computing memory).

Max HTTP object size

maximal size of the object that can be stored in cache.

With respect to statistics, the highest number of requests are for small objects (i.e. HTML pages, images, etc.). Big sized objects, such as archives (that are usually downloaded at once), would require too much memory in the cache.

Cache Options

Advanced options where cache behavior can be defined.

  • Continue aborted download — tick this option to enable automatic download of objects that have been aborted by the user (using the Stop button in a browser). Users often abort downloads for slow pages. If any user attempts to open the same page again, the page will be available in the cache and downloads will be much faster.

  • Keep aborted files in cache — if this option is enabled, the server will save even incomplete objects into the cache (object downloads which have not been finished). Downloads will be faster when the page is opened again.

    The Keep aborted files in cache option will be ignored if the Continue aborted download option is enabled.

  • Cache redirect responses — HTTP responses that contain redirections will be cached.

  • Use server supplied Time-To-Live — objects will be cached for time specified by the Web server from which they are downloaded. If TTL is not specified by the server, the default TTL will be used (see the HTTP protocol TTL item).

  • Ignore server Cache-Control directive — WinRoute will ignore directives for cache control of Web pages.

    Pages often include a directive that the page will not be saved into the cache. Enable the Ignore server Cache-Control directive option to make WinRoute accept only no-store and private directives.

    Note: WinRoute examines HTTP header directives of responses, not Web pages.

  • Always validate file in cache — with each query WinRoute will check the server for updates of objects stored in the cache (regardless of whether the client demands this).

Note: Clients can always require a check for updates from the Web server (regardless of the cache settings). Use a combination of the Ctrl-F5 keys to do this using either the Microsoft Internet Explorer or the Netscape/Mozilla browser. You can set browsers so that they will check for updates automatically whenever a certain page is opened (then you will only refresh the particular page).

URL Specific Settings

The default cache TTL of an object is not necessarily convenient for each page. You may require not to cache an object or shorten its TTL (i.e. for pages that are accessed daily).

Use the URL specific settings button to open a dialog where TTL for a particular URL can be defined.

Rules within this dialog are ordered in a list where the rules are read one by one from the top downwards (use the arrow buttons on the right side of the window to reorder the rules).

Description

Text comment on the entry (informational purpose only)

URL

URL for which cache TTL will be specified. URLs can have the following forms:

  • complete URL (i.e. www.kerio.com/cz/index.html)

  • substring using wildcard matching (i.e. *news.com*)

  • server name (i.e. www.kerio.com) — represents any URL included at the server (the string will be substituted for www.kerio.com/* automatically.

TTL

TTL of objects matching with the particular URL.

The 0 days, 0 hours option means that objects will not be cached.