Modifying the Cache Property File

Simple updates to the resource cache can be made by directly modifying the property file. There are three properties that can be configured using the property file. You can change the cache capacity, policy, and expiry of resources in the files.

It is important to 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 policy can be set to never.

Note: When you change the settings through JMX, these changes will also be persisted to these files.

To modify the cache settings for the remote component using the properties for Spectrumâ„¢ Technology Platform:

  1. Open the cache-feature.properties property file for the remote component in a text editor. This file is located in <spectrum>/server/modules/spatial/.
  2. Modify the 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.
  3. Modify the 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 JMX manually 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.
  4. Modify the 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.
  5. Save the file.
  6. Restart the server.