Caching Service Responses
This chapter describes how to use caching to accelerate service access time. It covers these topics:
•Using Request Content Caching
•Configuring Caching on a Handler
•Viewing Cache Information
•Clearing the Cache
Using Request Content Caching
The ACE XML Gateway can improve service response performance by caching responses. With caching enabled for a service, if the ACE XML Gateway receives an identical request within a configurable time period, it serves the cached response. This avoids the message exchange with the backend server, improving performance and reducing load on backend servers.
Caching is only available for advanced virtual services (that is, those made up of handlers, service descriptors, and routes). For basic virtual services, request caching is not supported.
For caching to work effectively, incoming requests must include a feature that can be used to determine the suitability of serving cached content. The feature may be, for example, a header or credential value. The configuration options in the handler's Caching page enable you to specify the header entries or parameters in an incoming request that are matched against the cache.
Caching is not appropriate for all types of services. Those that provide time-sensitive information are likely not appropriate for caching. In any case, the expiration times for cache can be configured individually for each handler.
Configuring Caching on a Handler
To configure caching for a handler:
Step 1 As an Administrator user or a Privileged user with the Routing role in the console, click the Virtual Services link in the navigation menu.
Step 2 In the Virtual Services browser, click on the handler for which you want to configure caching.
Step 3 Scroll down the page until the Caching section is visible, and click the Edit link next to the Caching heading.
Step 4 In the Caching page, click the radio button labeled Cache responses, using the following request message components as the cache key.
Step 5 In the Cache Key Components list, choose one or more feature of the message that can be used as a cache key. If incoming requests to this handler have the same cache key values, cached responses may be served for the subsequent requests.
Step 6 Specify the default and custom cache expiration policy for the response messages.
Figure 21-1 Cache configuration
Step 7 When finished, click Save Changes to commit your changes to the working policy.
When the policy is deployed, the ACE XML Gateway caches responses for the handler and serves cached responses for qualifying requests.
Viewing Cache Information
You can view cache-related information in the Cache Manager. The cache information displayed by the Cache Manager includes:
•The cache hit rate (how often cache is accessed, by handler, along with the number of hits as a percentage of overall requests received by the handler).
•The time saved by using the cache, per cache hit, in milliseconds
To use the Cache Manager page:
Step 1 Log into the ACE XML Manager web console as an
Administrator user or a
Privileged user with the
Step 2 Click the Cache Manager link in the Reports & Tools section of the navigation menu.
The ACE XML Manager displays the Cache Manager page. Handlers that have caching enabled appear in the list, along with information on caching activities related to the handler.
Figure 21-2 Cache Manager page
Step 3 By default, the Cache Manager page shows statistics for all Gateway appliances this Manager controls. To display only statistics for a specific Gateway, choose an item from the Show cache status on pull-down menu.
Step 4 To display only statistics for a specific time frame, choose an item from the during pull-down menu:
•last hour displays statistics for one hour prior to the search. This is the default value.
•last 12 hours displays statistics for 12 hours prior to the search.
•last 24 hours displays statistics for 24 hours prior to the search.
•last 7 days displays statistics for one week prior to the search.
•all records displays all statistics currently available to the ACE XML Manager.
Step 5 Click the Update button to refresh the display.
The Cache Manager page displays statistics for the chosen ACE XML Gateway appliances for the chosen time interval.
Clearing the Cache
By default, the cache is cleared after the expiration period. At any time, you can clear the cache manually as follows:
Step 1 As an
Administrator user or a
Privileged user with the
Operations role, click the Cache Manager link in the Reports & Tools section of the navigation menu.
Step 2 Clear cached responses as follows:
•To clear all handlers' caches, click the Clear Cache For All Handlers button at the bottom of the page. This causes the ACE XML Manager to clear the cache for all services.
•To clear the cache by handler, click the Clear Cache button at the end of its row in the Handler list.