Show TOC

SAP Web Dispatcher as a Web CacheLocate this document in the navigation structure

Use

You can configure the Web dispatcher in such a way that the contents (static and dynamic) are stored in the cache, and the next request to this page can be satisfied quickly from the cache.

Integration

The SAP Web dispatcher normally forwards incoming requests to an Internet Communication Manager (ICM), which is responsible for Web requests in SAP NetWeaver AS. Caching has been available in the ICM for some time now.

Features

The features are the same as in the ICM Server Cache, with the exception of invalidation of cache objects. The caching semantics, however, are not the same.

Unlike the ICM, the Web dispatcher does not use the proprietary SAP cache protocol - sap-cache-control - instead it uses the standard HTTP header field cache-control. Though, of its numerous supplementary RFC2616 directives, only max-age- the relative expiry time (in seconds) - is supported to date.

(The SAP cache protocol cannot be used in the Web dispatcher because it is not able to invalidate contents, unlike the ICM with its direct link to the work process in the application server (memory pipes). As with other Web caches too, the Web dispatcher therefore relies on passive invalidation using the expiry date ( max-age)).

The advantage of caching in the Web dispatcher over caching in the ICM is that the cache is located at the initial access point where all the requests arrive, and therefore all backend servers activated later and their network connections are offloaded.

An application wanting to use the cache in the Web dispatcher must therefore use the standard HTTP header field. This is recommended for static pages, images, and other large objects.

Recommendation

The ICM server cache is recommended for caching dynamic pages as it allows the application to actively invalidate cache objects. (see Invalidation of Cache Objects).

Activating Caching

Caching is deactivated in the Web Dispatcher by default.

You activate caching by specifying a URL prefix and cache directory in the parameter icm/HTTP/server_cache_0 in the Web Dispatcher profile.

For more information, see: icm/HTTP/server_cache_<xx>

Defining the Caching Protocol

You can define the caching protocol to be used by setting profile parameter

icm/HTTP/server_cache_0/http_cache_control = [true | false]

setzen.

This is preconfigured in the ICM and in the Web dispatcher:

  • Default in ICM is false: the proprietary sap-cache-control is used.

  • Default in Web Dispatcher is true: the standard log cache-control is used.

    Note

    You should change the preconfigured values in extreme cases only -for instance incompatibility problems arise with the new behavior.