Pregunta

Say, I set an entry on the Apigee through PopulateCache policy, with an expiration of 3600 seconds, with a key. When I perform a LookUp of the cache with a key, does it refresh the expiry time for the individual entry, or does it still stick to the original duration.

Ex: An Entry is cached for 3000 seconds and now I perform a LookUp. Does it get reset to 3600 seconds again, or does it stay at 3000 seconds only?

Thanks.

¿Fue útil?

Solución

Accessing a cached value using a LookupCache policy will not refresh its expiry TTL. If it looks like this is happening, you should ensure the PopulateCache policy has an appropriate condition. It sounds like you could be setting ("populating") the same value to the cache on every request and therefore never allowing it to expire.

<Step>
    <Condition>lookupcache.my-cache-lookup-policy.cachehit == "false"</Condition>
    <Name>my-populate-cache-policy</Name>
</Step>

ie. only populate the cache if the cache lookup missed

Otros consejos

​It was something to do with environment. Once I undeployed the code and redeployed it, things started working fine.

Golden rule of computing :-) Thanks.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top