How can we set cache resources and cache entry infinite i.e. it should never expire .

@Dino-at-Google @Anil Sagar @ Google

My requirement is to set cache resource and cache entry for infinite time . I have set it to -1 in populate cache the expiry time (TimeoutInSec) but it is getting clear almost in 5 min automatically . I have no clue why it is happening . below is the xml .

<PopulateCache enabled="true" continueOnError="false" async="false" name="SaveJWEInCache"> <CacheResource>cache_details</CacheResource> <Source>cacheInput</Source> <Scope>Global</Scope> <CacheKey> <KeyFragment ref="developer.app.id"></KeyFragment> <KeyFragment ref="botInstance"></KeyFragment> </CacheKey> <ExpirySettings> <TimeoutInSec ref="expiry_token"></TimeoutInSec> </ExpirySettings> </PopulateCache>

cache_details -- this is cache resource that I have set it to -1 .

In expiry_token ref i have set -1 as value in TimeoutInSec that i am picking from KVM .

I also tried 0 instead of -1 but no luck .

I have also tried to set date without using TimeoutInSec but still not working .

<ExpiryDate>12-01-2999</ExpiryDate>.

Could anyone please help me why it is happening or am I doing something wrong here . ?

Thanks in advance .

0 1 56
1 REPLY 1

Infinite caching is not supported. See https://docs.apigee.com/api-platform/reference/limits - the longest supported is 30 days.

If you need something to be stored indefinitely, you probably want to use KVM rather than cache, but the size limits on KVMs are more strict.