Caching Overview

A great deal of information in the system changes infrequently. In order to avoid accessing the database every time this type of information is required by an end-user or a batch process, the system maintains a cache of static information on the web server and in the batch thread pool worker. These are referred to as the "application caches". Some examples of application caches include

  • System messages

  • Field label and other field information

  • Security Information

The framework product provides many specific caches for commonly used (and infrequently changed) data. In addition, specific edge applications may introduce additional caches as appropriate.

Information may also be cached on each user's browser.

The following topics highlight information about refreshing the various caches.

Server Cache

The server cache refers to data that is cached on the web server. An important use of this cache is for users' online access to the application. The caches aid in better performance while navigating throughout the system, allowing for data to be accessed from the cache rather than by always accessing the database. Besides user access to the web server cache, other functionality deployed to the web server uses caches in a similar way. For example, web services are deployed to the web server and access their own version of the cache.

The contents of the cache are cleared whenever the web server is restarted. This means that fresh values are retrieved from the database once users and web services start using the application again.

The product also supplies a flush command that one can issue in the browser's URL to immediately clear the contents of the cache. The command flushAll.jsp flushes every cache.

For example, assume the following:

  • the web server and port on which you work is called OU-Production:7500
  • you add a new record to a control table and you want it to be available on the appropriate transactions immediately

You would issue the following command in your browser's address bar: http://OU-Production:7500/flushAll.jsp. Notice that the command replaces the typical cis.jsp that appears after the port number.

If your system has been configured correctly, the flushAll command will submit a request to do a "global" flush of caches (including the web services cache and the thread pool worker cache). This functionality uses a JMS Topic to publish the flush request. Refer to the Server Administration Guide for details on how to configure the JMS topic.

Also note that the system provides a business service F1-FlushAllService, which is equivalent to the flushAll command (except that it does not restart your browser session). This may be useful for any processes that are built to orchestrate updates to configuration data where you want to ensure that the cache is immediately flushed. This business service is also exposed as a REST web service.

Batch Cache

When submitting a batch job, the batch component uses a Hibernate data cache to cache administrative data that doesn't change very often. The tables whose records are included in this cache are configured using the Caching Regime value of Cached for Batch. This is often referred to as the "L2 cache". Refer to Tables for more information. When starting a thread pool worker, data in tables marked as cached is loaded and cached for as long as that thread pool is running.

In addition batch jobs may also access application caches when applicable. When starting a thread pool worker, application data that is cached is loaded and cached for as long as that thread pool is running.

If there are any batch jobs that update any tables that are marked as Cached for Batch, you must run that batch job using a special thread pool that is configured with the caching disabled. Contact your system administrator to confirm the thread pool that is configured this way.

If there is a change in cached data that should be available for the next batch job, the following points highlight how the cache can be refreshed:

  • By default the system is configured to automatically refresh the Hibernate cache every 60 seconds. However, an implementation may override the configuration to either change the number of seconds between intervals or to disable the automatic caching altogether. Application caches used by the batch jobs are not impacted by this refresh.

  • Restart the thread pool workers.

  • Run the F1-FLUSH (Flush all Caches) background process. This background process will flush the application data cached for all thread pool workers for all thread pools.

  • If your the region has configured the thread pool workers to "listen" to requests for global flush as described in the Server Cache section, the thread pool worker caches are also refreshed when a flushAll command is issued.

Client Cache

In addition to the web server's cache, information is also cached on each user's browser. After clearing the cache that's maintained on the web server, you must also clear the cache that's maintained on your client's browser. To do this, follow the following steps (note that depending on the browser you use, the steps may vary slightly):

  • Select Tools on your browser's menu bar
  • Select Internet Options... on the menu that appears.
  • Click the Delete Files button on the pop-up that appears.
  • Turn on Delete all offline content on the subsequent pop-up that appears and then click OK.
  • And then enter the standard URL to re-invoke the system.
Note: Automatic refresh of the browser's cache. Each user's cache is automatically refreshed based on the maxAge parameter defined in the web.xml document on your web server. We recommend that you set this parameter to 1 second on development / test environments and 28800 seconds (8 hours) on production environments. Please speak to system support if you need to change this value.