简体   繁体   中英

Oracle Coherence: How to get remaining time before expiration of a cache entry?

Is there anyway to get remaining living time of particular entry of the cache?

Eg I put entry to cache and after sometime want to know when it will be removed from the cache.

You have no way for that, I mean for obtaining the value inside the entry. It is not exposed by the Entry interface. In addition, if you invoke the "Get" method on that entry, automatically the TTL is resetted, and then you might get (theoretically) an entry "renewed". My suggestion is to add such value to the object you're trying to handle and to handle it by yourself. Isn't easy, but not impossible. Even more, you can read such value from the defined xml scheme and by this way you can save future headaches.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM