apim-cli icon indicating copy to clipboard operation
apim-cli copied to clipboard

cache for organizations

Open emmanuel-galindo opened this issue 1 year ago • 4 comments

APIM-CLI version

1.14.2

API-Management version

7.7.20231130

Question

Every time I execute apim api get it is showing this line: 2024-03-08 19:06:01,889 [APIManagerOrganizationAdapter] DEBUG: Organization id to be cached : /657a7bea-0778-XXX-XXXX-XXXXXX

I wonder it the cache is not being persisted in my installation .. I would expect this run on the first iteration, and then it gets it from the cache I am testing this with the command-line (not from a java project).

Thanks

emmanuel-galindo avatar Mar 08 '24 22:03 emmanuel-galindo

@emmanuel-galindo Can you use the flag -enabledCaches organizationCache for api import. please refer https://github.com/Axway-API-Management-Plus/apim-cli/wiki/8.4.-Caching for information.

rathnapandi avatar Mar 11 '24 19:03 rathnapandi

Thanks @rathnapandi .. I've tried it, but it keeps hitting APIM /organizations endpoint once and again. also, it prints this at beggining: 2024-03-11 18:48:29,937 [APIMCLICacheManager] ERROR: The cache: organizationCache is currently not supported for import actions.

emmanuel-galindo avatar Mar 11 '24 21:03 emmanuel-galindo

Hi @emmanuel-galindo,

Can you share the command line parameters which you used for testing?

rathnapandi avatar Mar 12 '24 04:03 rathnapandi

Hi, sorry I just noticed that my initial report was around "apim api get", not import.

That's where I see that line. I think "apim api get" comes with all caches by default right? I ran it anyways with -enabledCaches organizationCache but same result.

I am looking to improve speed of "apim api get" when searching for id

emmanuel-galindo avatar Mar 12 '24 15:03 emmanuel-galindo