Library Table of Contents Index Previous Next Comments

Which Web objects are cached

How NetCache decides which objects are cached  Top

Clients and Web servers use special tags in objects to instruct Web caches on what to cache and what not to cache. By default, the NetCache appliance does not cache an object if any of the conditions in the following table are met.

Condition

Explanation

An object's HTTP MIME header contains one of the following:

  • Cache-Control: no-cache
  • Cache-Control: no-store
  • Cache-Control: private
  • Pragma: no-cache

A MIME header, inserted by the Web server into the object, instructs the NetCache appliance not to save a copy of the object in its cache.

An object's HTTP MIME header contains a Set-Cookie line.

A Set-Cookie line, inserted by the Web server into the object, indicates that a cookie has been used. A cookie is used to maintain user-specific information, allowing for more personalized content. Because the content is usually specific to a user, caching it uses disk space for objects that will never be requested by another user.

Exceptions:

If the object contains "Cache-Control: public" in its header, or if the object has an extension that matches an item on the Cookie Cheat File Name Extensions list in the Appliance Manager, NetCache caches the object even if it contains a cookie.

You can define other types of objects as noncacheable  Top

Highly dynamic and user-specific content are not good candidates for caching because the information is unlikely to be requested by another user. One type of request you might want to define as noncacheable, for example, is a cgi-bin request. Because cgi-bin requests are highly dynamic, they are inherently noncacheable.

Another type of content you might want to define as noncacheable is any content on a Web server that is in the same domain as the NetCache appliance. If a Web server is local, the NetCache appliance can simply proxy requests for the Web server without having local objects use cache disk space.

Using the HTTP - Header and Caching Behavior page in the Appliance Manager, you can define explicit caching rules that specify objects as cacheable or noncacheable by date or time requested, Web server IP address, host name or port, client IP address or port, URL, URL prefix, or content type.

Caching static objects in URLs containing cookies  Top

Some Web servers use cookies to prevent Web caches from caching their Web pages. When a Set-Cookie header is included in the Web server response, the header is stored on the client. All subsequent requests for URLs that match the domain and path specified by the Set-Cookie header cause the client to issue a Cookie request header. Including this header makes these Web servers' pages noncacheable, even for static content.

However, even when some of the content of a Web page is user-specific, the content might contain objects that are static, such as graphics. The NetCache appliance enables you to define these objects as cacheable, even when the surrounding content is user-specific and, therefore, noncacheable.

You can instruct the NetCache appliance to cache specific objects, even when these objects have cookies associated with them, by using the Cookie Cheat File Name Extensions option on the HTTP - Header and Caching Behavior page under the Setup tab in the Appliance Manager. The Cookie Cheat File Name Extensions list causes NetCache to strip out the Cookie request headers so that they are not passed on to the origin server, thereby making these objects subject to normal caching rules.

Rules and options to determine cacheable objects  Top

You can configure what the NetCache appliance does and does not cache by creating and editing explicit caching rules through the Explicit Caching Rules tab on the HTTP - Header and Caching Behavior page, and by configuring additional options also on that page.

About explicit caching rules  Top

You can configure NetCache explicit caching rules to determine which objects NetCache will or will not cache. You can specify by date and time requested, Web server host name, server IP address, server port, client IP address, client port, URL, URL-prefix, or content type which objects fetched through HTTP requests will be cached on the appliance.

To view existing explicit caching rules in the Appliance Manager, select Setup tab > HTTP > Header and Caching Behavior. Click the Explicit Caching Rules tab to display the Current Explicit Rules table. This table lists the current explicit caching rules.

Options available to handle objects  Top

In addition to using explicit caching rules, you can configure other options on the Appliance Manager HTTP - Header and Caching Behavior page to specify the objects that the NetCache appliance does and does not cache.

The options in the following table are available.

If you want to...

Use this option...

Specify that the cache proxies Accept-ranges:byte headers from the origin server

Accept-Ranges Header Forwarding

Specify that objects are cached that do not have a Last Modified Time header or an explicit expiration time

4.1-Compatible Caching Enable

Specify that objects are reloaded in accordance with the listed reload rules

Reload Rules

Specify that the Cache-Control: no-cache header is ignored in objects that the client sends

Ignore No-Cache Directive on Client Reload

Strip the set-cookie header from any cached object containing a cookie

Treating Requests with No Cookie Match

Specify how NetCache handles a client request if the client requests a currently cached object containing a cookie but does not include a cookie in its request

Treating Requests with No Cookie Match

Specify source URLs whose fetched objects will be cached on this NetCache appliance even if they contain cookies

Cacheable Cookie by URL

Specify that objects that end in the listed extensions are cacheable, even if the objects contain a cookie

Cookie Cheat File Name Extensions

  • Specify that the ? and trailing characters are ignored when caching an object
  • Specify that items entered in the URL Trailing Characters Substring List are ignored when caching an object
  • Ignore URL Trailing Characters
  • Ignore URL Trailing Characters Substring List

Library Table of Contents Index Previous Next Comments