HTTP Cache Control

Starting with Red Hat Content Accelerator 2.2.1 and kernel patch 2.4.17-A1, Red Hat Content Accelerator supports the Cache-Control: max-age=x HTTP extension in addition to the basic cache-control properties such as the ETag and Last-Modified HTTP headers. While the basic properties allow the client browser to know whether the content in its cache is up-to-date while communicating with the server, this new feature allows browsers and proxies to cache the server's response for the specified time without the need to reconfirm with the server every time the content in its cache is accessed, reducing content load time for users, bandwidth and server resources usage.

Expiration time is set on a per file extension basis, in /etc/tux.mime.types discusses in previous paragraph. While a standard entry may look like below:

text/html    htm html

The following format should be used to assign expiration time to a file extension:

text/html     htm|1800 html|1800

This will set the expiration time for .htm and .html files to 1800 seconds (half an hour). If no expiration time is provided for a file extension, no Cache-Control directive will be issued while serving the file.

You may set a different expiration time for every extension, even if they belong to the same MIME type:

text/html     htm|1800 html|3600

or

text/html     htm|1800 html

NoteNote
 

To disable this feature on a server-wide basis, set the generate_cache_control parameter in /proc/sys/net/tux to 0.