By default, Metadata Server caches a copy of the information it retrieves from the external metadata database, so that it does not have to keep querying the database. In addition, SuperWEB2 caches some of the information it receives from Metadata Server, so that it does not have to keep querying the database.
When you make changes to your metadata, you may need to clear one or both of these caches in order to see the changes in the SuperSTAR clients.
Clear the Metadata Server Cache
To clear the Metadata Server cache, you either need to restart the Metadata Server, or use the supplied cache flush tool (metadata_cacheflush.exe). This tool is located in the SuperSERVER program files directory (by default, C:\Program Files\STR\SuperSERVER SA).
Clear the Cache
To clear the cache, open a command prompt and change to the SuperSERVER program files directory, then run the tool using the following options:
|The name of the Metadata Server to connect to. If you do not specify a server, it will default to |
|The port the Metadata Server is listening on. If you do not specify the port, it will default to |
The ID of the dataset to clear from the cache. If you do not specify a dataset ID then the cache will be cleared for all datasets.
You can specify multiple datasets if necessary; separate the IDs with either a comma (
For example, the following command clears the cache for the
bank dataset, on the instance of Metadata server running on
The following examples clear the cache for the
Clear the Entire Cache
To clear the entire Metadata Server cache for all datasets, simply run the cache flush tool without the
If your Metadata Server is running on localhost using the standard port number, then you can clear the entire cache by running the cache flush tool with no options at all.
Help using the Cache Flush Tool
The cache flush tool has a
-h option that you can use if you need to check the valid arguments:
Clear the SuperWEB2 Metadata Cache
In addition to the Metadata Server cache, SuperWEB2 also caches some of the information it receives from Metadata Server. You may also need to clear this cache to see any changes reflected in the SuperWEB2 client.
To flush the SuperWEB2 cache, use the following REST endpoint: /webapi/rest/metadata/flushCache
For example, if your SuperWEB2 is installed at http://myserver:8080/webapi/ then the full URL of the REST endpoint would be http://myserver:8080/webapi/rest/metadata/flushCache
Only administrator users (users who belong to the SuperADMIN group specified by the
administratorGroup parameter in web.xml) can use this REST endpoint. There are a number of ways you can provide the appropriate authentication:
- Log in to SuperWEB2 as an administrator user, then open the REST endpoint URL in the same browser. The endpoint will use your session cookie to validate your login. If you successfully call the endpoint you will see a blank page in your browser window.
- Use a REST client, such as Postman to access the REST endpoint using HTTP Basic Authentication.
Regardless of whether you manually clear the cache, SuperWEB2 will periodically refresh its cache of information from the metadata database. You can control how frequently this happens by editing the
metadata.cacheSpec setting in the configuration.properties file.