Flush PPM cache

You can flush PPM cache using the kRunCacheManager.sh command line tool, the ksc_flush_cache special command, or REST APIs.

Note: These two methods should be called after modifying the data directly in the database without going through one of the supported PPM interfaces such as Web UI, SOAP Web Service, and REST Web Service.

Use kRunCacheManager.sh

kRunCacheManager.sh is a shell script that is run from the command line.

Syntax

sh ./kRunCacheManager.sh [<URL>] <cache number>

Parameters

Parameter Description
URL

Optional.

If omitted, it connects to the first running RMI_URL defined in the server.conf file. You can pass multiple RMI urls, separated with semicolons (;), and it connects to the first running one. It is safe to omit this parameter unless you want to connect to a specific PPM node. For example, to reset cache statistics or request a garbage collection.

Cache Number

The number next to the cache that you want to flush. In order to view the list of caches with their numbers, run the command without any parameters to list all caches and you are prompted for possible options.

You can also input a letter to trigger the following actions:

  • A. Flush all caches. It is strongly advised not to use this option when running kRunCacheManager in an automated way.

  • B. Flush validation caches. This flush the validation related caches only. It can be used when validation definition or values are directly edited in PPM database.

  • C. Reset cache statistics counters. This only affects the node you are connected to.

  • D. Force garbage collection.

Issues and limitations

Using kRunCacheManager.sh has the following issues and limitations:

  • The order of the caches in the list is not consistently enforced and can vary between environments or PPM versions. As a result, if you flush a specific cache designated by its number in a script, it is possible that the corresponding cache may change at some point in the future. You should verify that the cache numbers are not changed after every PPM upgrade or environment change.

  • It is not possible to flush only one entity in a cache; the whole cache has to be flushed. This can result in performance impact as all objects from the flushed cache need to be reloaded. This could have performance impact under heavy load if some caches are flushed too often.

  • It is strongly advised NOT to use the flush all caches option (kRunCacheManager.sh A) in an automated way, as it may have performance under heavy system load.

  • If the cache is flushed using kRunCacheManager.sh while the cache maintenance thread is running (it runs every 10 seconds by default), an exception may be fired and the kRunCacheManager.sh cache flush action may be ignored.

Back to top

Use ksc_flush_cache

ksc_flush_cache is a PPM special command that can be invoked from any command step, such as workflow step and PPM report command step.

For details, see ksc_flush_cache.

Back to top

Use REST APIs

You can use the following REST APIs to flush PPM caches:

  • itg/rest2/​cache​/cache​/{cacheIdentifier}​/flush
  • itg/rest2/cache/{cacheIdentifier}/flush/{cacheEntityKey}

  • itg/rest2/cache/flushAll

    Note: Do not use this in the production environment.

For details, see Interactive REST API Help.

Back to top

See also: