Modifying Cache Properties

Simple updates to the resource cache can be made in the Management Console. There are three properties that can be configured to change the cache: capacity, policy, and expiry of resources in the files. Changes to these properties persist after restarting the Spectrum™ Technology Platform.

It is important to note, the larger the capacity, the more memory will be used. Both the capacity and policy should be set based on your specific requirements. For example, if the resources in your repository will never change once created, the capacity can be set lower, and the policy can be set to never.

To modify the cache settings for the remote component using the properties for Spectrum™ Technology Platform:

  1. Open a web browser and go to http://server:port/managementconsole

    Where:

    server is the IP address or hostname of your Spectrum™ Technology Platform server.

    port is the HTTP port used by Spectrum™ Technology Platform. The default is 8080.

  2. Log in using the admin account.
  3. From Resources, click Spatial.
  4. Double-click on the value of the repository.cache property you want to change and enter a new value (see details below).
  5. Click Save.

The remote component (JVM instance) automatically restarts with the change.

Repository cache properties are:

  • repository.cache.capacity This is the number of resources cached by the remote component at any given time. If the capacity is modified, the current resource cache will be cleared, and a new one created. As the capacity is reached, older resources in the cache are removed to make room for newer resources. It is important to remember, if a resource is cached that uses other resources (e.g., a named map uses multiple named tables), both that resource and all resources used are also cached.
  • repository.cache.policy This is the way resources in the cache will be checked to see if they need to be updated with the latest version in the repository. The policy values are 0, 1, or 2. Where 0=Never, 1=Always, and 2=Check with Expire. Never checking the resource cache means that no checking for resource updating is done. Cached resources can be removed through the JMX Console manually (using the remove operation) if they are changed in the repository and you need to modify the cache. Always checking the resource cache means that every time a resource is required from the cache, it will check if the cached resource is the same as in the repository. If the resource has changed, a new one will be loaded into the cache. Checking with expiry will only check resources in the cache for updating if the expire time since the last check has been exceeded. The expire time is the value defined in the repository.cache.expire property. This value is in milliseconds.
  • repository.cache.expire This is the expiry time in milliseconds. If the cache policy is set to 2 (check with expire), this value is used as the interval to check for updating the resource when trying to be accessed.

For a summary of these and other Spatial properties and their initial settings, see Setting Spatial Java Properties.