Hi Ivyteam, According to the javadoc: I try to store the value by using IDatacach with lifetime's value is 0. Then I expected that it will be expired after 1 minute. But unfortunately, it seems to be infinite time in IvyCach, even I call it again after 5 minutes. After Hau Tran's TA guy dig into the ivy source code. He found that, there is one condition to check like that if (lifetime > 0) in the method processGroup and processEntry of DataCacheInvalidationJob class. Now, you see that the java doc make me consufed about the lifetime's explanation. I am looking forward to hearing any ideas from you :) Vuong Vu asked 14.02.2017 at 05:56 vhsvuong |
To expire the cache after one minute I would pass '60' as lifetime (in seconds). However the fact that the value zero (0) behaves like -1 is for legacy reasons. For a long time the cache was accidentally wrong implemented (lifetime > 0). So many implementations in the field already rely on the fact that 0 is also cached forever. And we'll not change the implementation to keep these old projects happy. In my opinion it also makes no sense to use a cache which is only valid for less than a second. answered 17.02.2017 at 14:35 Reguel Werme... ♦♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 14.02.2017 at 05:56
Seen: 1,059 times
Last updated: 17.02.2017 at 15:46