Managing Repository Cache in the Spectrum JMX Console

The repository cache properties in the Spectrum JMX Console check the cache status, clear all or remove specific cached resources, modify the cache configuration, and monitor the resource in the cache.

Changes to repository cache property settings in the Spectrum JMX Console do not persist after restarting the Spectrum Technology Platform. To set properties that persist after restart, see Modifying Cache Properties.

To change repository cache properties in the Spectrum JMX Console:

  1. Open a web browser and go to http://server:port/jmx-console

    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. Under "Domain: Spatial", click Spatial:name=Cache,type=Remote Component.
  4. Change settings for the managed cache properties described below.

Managed cache settings:

  • 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.
  • 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.
  • UpdateCheckPolicy - 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 Spectrum 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 Expire property. This value is in milliseconds.
  • remove (resources) - This is used to remove specified resources from the cache. Enter the directory structure from the repository you would like to remove from the cache starting at the root. Usually used when you have the policy set to Never (0) and you are updating resources in the repository, this allows you to clear the older resource definitions from the cache, so the next time the resource is accessed, it will be updated in the cache using the new definition. The wildcard character * can be used at the end of a path to remove all resources within a directory or subdirectories. For example, if you would like to remove all resources within the samples directory, enter /samples/*.
  • clear (cache) - This is used to clear the entire cache. This will also reset all counts in the monitored statistics.
  • listCacheResourceNames - This is used to return all of the resource paths within the cache. If you are removing resources manually from the cache using the Spectrum JMX Console (using the remove operation), it is good practice to first list all the cached resources to get an accurate list of cache paths to remove.
Note: The larger the capacity, the more memory will be used. Both the capacity and policy should be set base 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 UpdateCheckPolicy can be set to Never (0).