Populate cache expiry problem

we use populate cache policy and cache expire after 1 hour although we made the expiration after 30 days in configuration cache

here is my populate cache code

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> PC-JWT-Populate oauth-token-cache JWS Global apiAccessToken1

and look in the configuration we set the value to the 2592000 seconds

we need to know what is the problem here.

appreciate your support @dchiesa1

1 Like

I am not sure that the configured value is applied to each PopulateCache policy. This may be a bug in the runtime, or it may be an incorrect documentation.

To be safe, if you want your cache item to live longer, specify the TTL in the PopulateCache policy itself.

<PopulateCache name="PC-JWT-Populate">
  <CacheResource>oauth-token-cache</CacheResource>
  <Source>JWS</Source>
  <Scope>Global</Scope>
  <CacheKey>
    <KeyFragment>apiAccessToken1</KeyFragment>
    <KeyFragment ref="access_token"/>
  </CacheKey>
  <!-- add the section below -->
  <ExpirySettings>
    <!-- 864000 = 10 days -->
    <TimeoutInSeconds ref='duration_variable'>864000</TimeoutInSeconds> 
  </ExpirySettings>
</PopulateCache>
1 Like

Hi @dchiesa1 Thank you for your fast response,

first, what about it will be deleted in this case?
second, is this cache is will be stored in Casandra also or not?

finally, how we can use LookupCache policy without CacheResource or how to get the value of a specific cache without CacheResource element?

1 Like

@dchiesa1 @ssvaidyanathan can you help me in this case?

1 Like

first, what about it will be deleted in this case?

I don;t understand what you are asking here. What do you mean “it will be deleted” ?

second, is this cache is will be stored in Casandra also or not?

Yes, the cache is distributed via a persitence layer.

finally, how we can use LookupCache policy without CacheResource or how to get the value of a specific cache without CacheResource element?

omit the CacheResource element from the configuration. In that case, the policy will read from a generic cache.

1 Like