Cache to never expire for entries in Org Level KVM

Hi I have API Proxy bundle where I am using Org Level KVM and Environment level cache

Org Level KVM has the entries for my tenants which I use in JS policy to retrieve the values.

Now I populate the cache with these values and never want cache to expire

There are two Policies below where we have Expiry settings which is -1, but still cache gets expired. When I execute the API call, it doesn't hit the cache after some time when I check through Trace.

KVM-GetTenantConfig.xml

<ExpiryTimeInSecs>-1</ExpiryTimeInSecs>

PopulateCache-SetTenantConfig.xml

<ExpirySettings> <TimeoutInSec>-1</TimeoutInSec> </ExpirySettings>

Currently, I am creating environment level cache (lookupcache) using the below API call with blank json input. But I can see there is some Expiry settings , which we can provide while creating environment level cache.

/v1/organizations/kronos5/environments/test/caches?name=lookupcache

POST

{}

So what is the best practice/approach to provide the Expiry settings so that cache never expires ?

Does it need to be provided in Policies (KVM and Populate Cache) or while creating Environment level Cache ?

Also find the attached latest proxy bundle for your reference. Please check the same.

legacy-api-v1-department-rev1-2016-09-19.zip

0 3 233
3 REPLIES 3

@GAURAV , Attachment is missing, Can you please update same.

@Anil Sagar

Forgot, attaching the same and the JS files

jsfiles.zip

Hi @Anil Sagar

Did you get a chance to look into the above issue.

Also when I change the expiry settings below, it works for 1 hour where the cache don't expire but it is not working with -1 as we want cache to never expire.

PopulateCache-SetTenantConfig.xml

<ExpirySettings> <TimeoutInSec>3600</TimeoutInSec> </ExpirySettings>

Please check.

Thanks