Skip to content

8.4. Caching

Chris Wiechmann edited this page Jun 10, 2020 · 28 revisions

The CLI is using the official API-Manager REST-API in order to load the Actual-API(s).

Based on the number of APIs, Applications, Organizations, this might result in a massive amount of requests and significantly reduces the performance of the CLI, especially when doing a massive export of APIs or Applications.

To avoid requesting the same entities over and over again, the CLI is using a cache, which persists the requested information to disk and it is reusing next time the CLI is called.

The CLI is delivered with a preconfigured set of entities and you can configure the caches time-to-live yourselves in the configuration file: lib/cacheConfig.xml.

If you would like to clear one, more or all caches you can provide the option: -clearCache to a command:

-clearCache ALL                        -- All caches are cleared and will be filled up with fresh data
-clearCache "*API*"                    -- All caches named with API. This is NOT case sensitive.
-clearCache "organizationCache,*API*"  -- Clears a combination of combination of caches

The get a list of all available caches, just provide an invalid to the clearCache option (-clearCache XXXX)

Also you can use the toggle: -ignoreCache true to skip using the caches at all.

Please note: As of now, caches are NOT used for import actions such as API-Import or App-Import.