The Application Server retrieves data from the InterAction database and stores it in a cache on the server. The data in this cache is then used when responding to requests. Application Server keeps the cache updated by refreshing it on a regular basis. You can also force a manual cache refresh, if necessary.
By caching data in memory, Application Server can respond quickly to requests from browsers. This is important, as users expect Web pages to display quickly.
This section explains the caching options you can set for Application Server. These are necessary when coordinating Application Server with other scheduled processes.
This section covers the following topics:
- Data Cached by Application Server
- Cache Refresh Rate Settings
- Preventing Automatic Cache Refreshing
- Manually Refreshing the Cache
- Viewing the Cache Report
Data Cached by Application Server
Application Server caches much of the information that needs to be accessed by users. This information includes the following:
- Additional field definitions
- Classification definitions
- Firm Contacts
- Countries and states
- Folders
- Types (for example, activity types, appointment types, phone types)
- Users
- User access rights
Application Server does not cache all InterAction data. For example, the values for all additional fields for a contact are not cached during the refresh. Instead, this data is retrieved when Application Server needs it – for example, when Web Client builds a page containing a nugget that displays the additional fields for the contact.
The following is data that is not cached:
- Who Knows Whom information
- Related contacts information
- Global mailing address for each contact
- Primary addresses and phones for each contact
- Non-primary addresses and phones
- Notes
- Activities
- Additional field values
- Classification values
- Alerts
Application Server caches this data when initially starting up, then updates the cache at the frequency specified in the cache refresh rate settings (discussed in Cache Refresh Rate Settings). Note that the cache refresh does not replace the cache each time. Instead, each cache refresh brings the cache up-to-date by adding and changing data in the cache as needed to match changes in InterAction.
If users make changes to this type of information in InterAction, the changes are not available through Application Server until after the next cache refresh. For example, if a user adds a new contact in InterAction, that contact is not available in Application Server until the next cache refresh.
Cache Refresh Rate Settings
You control the cache refresh rate by specifying the interval in minutes. To specify the InterAction cache refresh rate, set the IACacheRefreshRate variable in the InterAction.cfg:
IACacheRefreshRate = 20
In this case, Application Server updates the cache every 20 minutes.
Depending on the size of your database, refreshing the cache can take several minutes. You should consider this when deciding the cache refresh rate. There should be a balance between keeping the data in Application Server updated with the latest data from InterAction and maintaining good performance for the server.
For most organizations, setting the cache refresh rate between 10 and 60 minutes works well. If you experience performance problems, consider decreasing the refresh rate to decrease the load on the server. To decrease the rate, increase the amount of time between refreshes. For example, change the IACacheRefreshRate to 60 (minutes) instead of 20.
Note that the initial cache when starting up Application Server always takes longer than subsequent refreshing. This is because Application Server must load all the data on the initial cache and only the changes after that. Therefore, look at the cache refresh time for a subsequent refresh rather than an initial cache. When you manually refresh the cache, Application Server displays the amount of time it took.
Preventing Automatic Cache Refreshing
At times it is preferable to stop Application Server from automatically refreshing the cache. This is important when scheduling other automated processes that use server resources, such as database backups, InterAction Application Collaboration, and other ongoing tasks.
For details about scheduling these processes, see InterAction Scheduling Issues.
You can define a “sleep window” for Application Server during which Application Server does not refresh the cache automatically or purge watch events. During this sleep window, Application Server only accesses the InterAction database(s) in the following situations:
- An administrator manually refreshes the cache (see Manually Refreshing the Cache).
- The system needs data that is normally not cached, such as additional field values, notes, or activities when building a page.
To define a sleep window, you set the SleepWindow variable in the InterAction.cfg file. For example, this line stops automatic refreshing between one minute after midnight and 3:00 A.M.:
SleepWindow = 00:01-03:00
Note the following rules for the SleepWindow setting:
- Specify time in 24-hour format. Enter hours and minutes, for example, “23:30” for 11:30 P.M.
-
You can define multiple sleep windows. Separate each interval with semi-colons:
SleepWindow = 22:00-24:00;00:01-03:00
This sets two sleep windows - one between 10:00 P.M. and midnight, and a second one between one minute after midnight and 3:00 A.M.
- The same sleep windows are used for each day. You cannot define different windows for different days.
-
A day begins and ends at midnight. Therefore, if you want the sleep window to last overnight you must define two windows.
For example if you want the window to occur from 10:00 P.M. until 3:00 A.M., you would set the following:
SleepWindow = 22:00-24:00;00:00-03:00
Use 00:00 as midnight at the beginning of the window and 24:00 for midnight at the end.
- Application Server uses the time set for the Application Server, not the database server.
Manually Refreshing the Cache
In order to refresh the Application Server cache, you must be an Application Server Administrator. See Application Server Administrative Users, for more information.
Occasionally you may need to manually refresh the Application Server cache. For example, if you create a new user in InterAction Administrator, that user cannot log in to the system until the next refresh.
To manually refresh the cache, enter the following in your browser:
http://[Application Server Host Name]/InterAction/reloadIACache
...where [Application Server Host Name] is the name of your Application Server. For example, if your Application Server host name is IAServer1, the following address refreshes the cache:
http://IAServer1/InterAction/reloadIACache
You may want to create a bookmark in your browser for this location to save time later.
Viewing the Cache Report
You can view a report showing the number of items loaded into the cache and the last time it was refreshed.
To view this report, enter the following in your browser:
http://[Application Server Host Name]/InterAction/iaCacheReport
...where [Application Server Host Name] is the name of your Application Server. For example, if your Application Server host name is IAServer1, the following address displays the report:
http://IAServer1/InterAction/iaCacheReport