Populate Cache Policy Expiry Settings

Hello I have general question on the priority of the of expiry cache in Populate Cache policy. In the documentation it specifies:

"Specifies when a cache entry should expire. When present, <TimeoutInSec> overrides both <TimeOfDay> and <ExpiryDate>."

<ExpirySettings>
  <TimeOfDay ref="time_variable">expiration_time</TimeOfDay>
  <TimeoutInSec ref="duration_variable">seconds_until_expiration</TimeoutInSec>
  <ExpiryDate ref="date_variable">expiration_date</ExpiryDate>
</ExpirySettings>

I understand that that the <TimeoutInSec> has priority over the other settings. However, say if I want to expire the cache every night at 00:00:00 using <TimeOfDay>, but I have my <TimeoutInSec> cache and it happens that it won't expire at that time. Will it still expire at <TimeOfDay> specified time.

If it cannot do that, is there any implementation that allows for me to do this?

Thanks, Dom

Solved Solved
1 3 500
1 ACCEPTED SOLUTION

Not possible to do both.

As the documentation states, "When present, <TimeoutInSec> overrides both <TimeOfDay>and <ExpiryDate>."

View solution in original post

3 REPLIES 3

I don;'t understand the critical part of your question.

[suppose] I want to expire the cache every night at 00:00:00 using <TimeOfDay>, but I have my <TimeoutInSec> cache and it happens that it won't expire at that time. Will it still expire at <TimeOfDay> specified time.

If you want it to expire at a specific time of day, why would you use TimeoutInSec ?

If you want it to expire at a specific time of day, use <TimeOfDay>. This seems so obvious that I'm sure I'm missing the point of your question. Please explain.

It was more of a hypothetical situation and I want to know if it is possible to do both. I thought there may be a technical requirement which asks me expire the cache every day, as well expire based on a timeout throughout the day, which seemed to me to be a possible scenario. But I could be wrong and that may not make much sense.


So, just to clarify. Is it not possible to do both at the same time?

Not possible to do both.

As the documentation states, "When present, <TimeoutInSec> overrides both <TimeOfDay>and <ExpiryDate>."