Edge Side Includes | Best Practices
ESI Processor
The cache implemented by the ESI processor is an in-memory cache, not a disk cache. Therefore, the cache entries are not saved when the Web server is restarted.The basic operation of the ESI processor is as follows:
- 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 miss occurs, a surrogate-capabilities header is added to the request by the plug-in and the request is forwarded to the WebSphere Application Server.
- If the dynamic servlet cache is enabled in the application server, and the response is edge cacheable, the application server returns a surrogate-control header in response to the IBM HTTP Server Plug-in. The value of the surrogate-control response header contains the list of rules that are used by the ESI processor in order to generate the cache ID.
- The response is then stored in the ESI cache, using the cache ID as the key.
- For each ESI include tag in the body of the response, a new request is processed such that each nested include results in either a cache hit or another request forwarded to the application server.
- When all nested includes have been processed, the page is assembled and returned to the client.