javalearner javalearner - 1 year ago 125
Java Question

Oracle coherence caching, specifying expiry timeout while adding the object into cache

I am using oracle coherence caching.

For configuring expiry, there is a parameter called 'expiry-delay' to configure the expiry in xml file.

I would like to know if it is possible to pass the expiry duration while adding the object into the cache.

Appreciate any help on this.

Answer Source

try to set TTL value when you put new item to the cache

Object put(Object oKey,
       Object oValue,
       long cMillis)

CacheMap JavaDoc

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download