Configure edge side include (Esi) Cache

Source: Internet
Author: User
Tags websphere application server

WebSphere Application Server

Http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp? Topic =/com.ibm.websphere.nd.multiplatform.doc/INFO/AE/tdyn_esiedgecaching.html

The Web server plug-in contains the built-in ESI processor. The ESI processor can cache the entire page and segment at high speed, providing a high cache hit rate. The high-speed cache implemented by the ESI processor is a memory high-speed cache instead of a disk high-speed cache. Therefore, when the web server is restarted, the high-speed cache entries are not saved.

About this task

PassPlugin-cfg.xmlFile to configure edge side include (Esi ).

When a request is received by the Web server plug-in, it is sent to the ESI processor unless the ESI processor is disabled. It is enabled by default. If a cache hit occurs, the surrogate-capabilities header is added to the request and the request is forwarded to the WebSphere Application Server. IfProgramWhen servlet cache is enabled on the server and the response is edge cached, the application server returns the surrogate-control header to the WebSphere Application Server plug-in response.

The surrogate-control response header value contains a list of rules that the ESI processor uses to generate a cache ID. Then, the response is stored in the ESI high-speed cache and uses the high-speed cache identifier as the key. Each ESI include tag in the response body processes new requests, so that each nested include leads to cache hits or another request is forwarded to the application server. When all nested include operations are processed, the page is assembled and returned to the client.

The ESI processor can use the WebSphere Web Server plug-in configuration file Plugin-cfg.xml . The following is an example at the beginning of this file, which describes the ESI configuration options.
 
<? XML version-"1.0"?>
<Config>
<Property name = "esienable" value = "true"/>
<Property name = "esimaxcachesize" value = "1024"/>
<Property name = "esiinvalidationmonitor" value = "false"/>
Process
  • The first option, esienable, can be used to disable the ESI processor by setting the value to false. By default, ESI is enabled. If you disable ESI, ignore other ESI options.
  • The second option, esimaxcachesize, is the maximum cache size, measured in 1 K bytes. The default Maximum Cache size is 1 MB. If the cache is full, the first entry evicted from the cache is the closest entry to expiration.
  • The third option is esiinvalidationmonitor, which specifies whether the ESI processor receives invalid messages from the application server. ESI works well when only one process is started using a web server that follows the thread technical model. When multiple processes are started, each process caches their respective responses and does not share the cache. This may cause the system memory to be completely exhausted by the ESI processor. There are three ways to remove entries from the ESI high-speed cache: first, there is a cutoff timeout for the entry; second, you can clear the entry to leave the space to a newer entry; or third, the Application Server explicitly fails to send messages to the entry group. To enable the third mechanism, the esiinvalidationmonitor attribute must be set to true, and the dynacacheesi application must be installed on the application server. The dynacacheesi application is located in the installableapps directory and named dynacacheesi. Ear. If the esiinvalidationmonitor attribute is set to true but the dynacacheesi application is not installed, an error will occur in the web server plug-in and the request will fail.
  • On the distributed platform, the cachemonitor application is used to monitor the high-speed cache of the ESI processor. To make the ESI processor cache visible in cachemonitor, The dynacacheesi application must be installed as described above andPlugin-cfg.xmlSet the esiinvalidationmonitor attribute to true.
  • when WebSphere Application Server is used to maintain static data (such as images and HTML on the Application Server), the URL is also cached in the ESI processor. This data has a default timeout of 300 seconds. You can change the timeout value by adding the attribute com. IBM. servlet. file. ESI. timeout to the Java Virtual Machine (JVM) command line parameter. the following example shows how to set a one-minute timeout for static data (cache in the plug-in):
    -DCOM. IBM. servlet. file. ESI. timeout = 60 

    for information about configuring alternate URLs, see configure alternate URLs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.