You can specify several configuration parameter values for URLs matching a regular expression pattern that you specify. This feature gives you fine control of the proxy cache based on the type of document cached. Configuring the cache can include identifying the following items:
The cache default
How to cache pages that require authentication
How to cache queries
The minimum and maximum cache file sizes
When to refresh a cached document
The cache expiration policy
The caching behavior for client interruptions
The caching behavior for failed connections to origin servers
If you set the cache default for a particular resource to either Derived configuration or Don’t cache, the cache configuration options will not appear on the Set Caching Configuration page. However, if you choose a cache default of Cache for a resource, you can specify several other configuration items.
Access the Server Manager, and click the Caching tab.
Click the Set Caching Configuration page.
The Set Caching Configuration page is displayed.
Select the resource from the drop-down list or click the Regular Expression button, type a regular expression, and click OK.
Change the configuration information.
Click OK.
Click Restart Required.
The Apply Changes page is displayed.
Click the Restart Proxy Server button to apply the changes.
The following sections include information that will help you to determine which configuration will best suit your needs.
The proxy server enables you to identify a cache default for specific resources. A resource is a type of file that matches certain criteria that you specify. For instance, to have your server automatically cache all documents from the domain company.com, you could create the following regular expression
[a-z] *://[^/:]\\.company\\.com.*.
By default, the Cache option is selected. Your server automatically caches all cacheable documents from that domain.
If you set the cache default for a particular resource to either Derived configuration or Don’t cache, it is not necessary to configure the cache for that resource. However, if you choose a cache default of Cache for a resource, you can specify several other configuration items. For a list of these items, see Configuring the Cache.
The cache default for HTTP, FTP, and Gopher can also be set.
You can have your server cache files that require user authentication. The Proxy Server tags the files in the cache so that it can require authentication from the remote server if a user asks for them.
Because the Proxy Server cannot determine how remote servers authenticate and it does not have a list of users’ IDs or passwords, it will simply force an up-to-date check with the remote server each time a request is made for a document that requires authentication. The user therefore must type an ID and password to gain access to the file. If the user has already accessed that server earlier in the browser session, the browser automatically sends the authentication information without prompting the user.
If you do not enable the caching of pages that require authentication, the proxy does not cache them, which is the default behavior.
Cached queries only work with HTTP documents. You can limit the length of queries that are cached, or you can completely inhibit caching of queries. The longer the query, the less likely it is to be repeated, and the less useful it is to cache.
The following caching restrictions apply for queries:
The access method has to be GET, the document must not be protected (unless caching of authenticated pages is enabled), and the response must have at least a Last-modified header. This requires the query engine to indicate that the query result document can be cached.
If the Last-modified header is present, the query engine should support a conditional GET method (with an If-modified-since header) in order to make caching effective; otherwise the query engine should return an Expires header.
You can set the minimum and maximum sizes for files cached by your Proxy Server. You may want to set a minimum size if you have a fast network connection. If your connection is fast, small files may be retrieved so quickly that having the server to cache them is unnecessary. In this instance, you would want to cache only larger files. You may want to set a maximum file size to make sure that large files do not occupy too much of your proxy’s disk space.
The up-to-date checking policy ensures that the HTTP document is always up-to- date. You can also specify the refresh interval for the Proxy Server.
You can set the Expiration Policy using the last modified factor or the explicit expiration information.
If a document is only partially retrieved and the client interrupts the data transfer, the proxy can finish retrieving the document for the purpose of caching it. The proxy’s default is to finish retrieving a document for caching if at least 25 percent of the document has already been retrieved. Otherwise, the proxy terminates the remote server connection and removes the partial file. You can raise or lower the client interruption percentage.
If an up-to-date check on a stale document fails because the origin server is unreachable, you can specify whether the proxy sends the stale document from the cache.