Embedder Session Cache

The embedder session cache stores data and other information that the Corda® Embedder sends over the comm port. By storing this information in the key cache, Corda Server™ returns a Corda image or Highwire™ document to a browser more quickly when it is requested.

The information remains in the embedder session cache for a certain period of time, known as its session time, after it is stored. The implications of this behavior are: 1) the information disappears after a certain time even if it is not requested, and 2) if the information is requested multiple times during this period, each request is accelerated by using the embedder session cache. By default the session time is twenty minutes.

Corda Server sets aside a certain amount of RAM for the embedder session cache. By default, the cache uses 10 MB of RAM. If the embedder session cache ever grows beyond this size, it begins using disk space to store the embedder session cache. Older objects are moved from RAM to disk to make room for newer objects. By default, the embedder session cache is located in the tmp/keycache directory.

Change embedder session cache settings in Corda Server Administrator on the Server Settings > Embedder Session page.

The exact effects of changing the embedder session cache are hard to predict, and vary greatly depending on server load and system specifications. However, changes do not generally affect Corda Server performance.

Circumventing the Embedder Session Cache

Corda Server uses an embedder session cache to store information (such as data and Image Template files) about each image that the Corda Embedder embeds in a Web page By default, Corda Embedder only embeds an embedder session ID within the actual Web page. When a browser requests an image with this ID, Corda Server looks up this ID in the embedder session cache and retrieves the appropriate information.

For example, the code below shows how Corda Embedder would typically embed a JPEG image. @_CPRBB_Phjd_gBSy is the embedder session ID.

<img src="http://server.mycompany.com:2001/?@_CPRBB_Phjd_gBSy@_JPEG>

Alternatively, Corda Embedder can embed all of the information about a Corda image within the actual Web page. In other words, the Web page contains the full request for the Corda image. In this case, the same embedded image might look something like this:

<img src="http://server.mycompany.com:2001/?@_FILE/examples/bar.itxml@_PCSCRIPTgraph.setcategories(Red;Yellow;Green)graph.setSeries(Line1;35;65;12)@_JPEG">

Note: If you are passing a lot of data in PCScript, this request can grow to be quite large.

The advantages of using the embedder session cache are two-fold: 1) it reduces Web page size; 2) it circumvents issues that certain browsers and image formats have with long URLs (see Overcoming URL Length Restrictions in the Corda 7 Developer Reference).