I have created a cache in the web sphere which will be shared by multiple applications and i wanted to make one entry in the created cache to not to expire. How can i make it ?
Thanks and Regards,
Sunny.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you deriving/using WebSpheres dyna-cache (DistributedObjectCache)? How are you creating your cache instance?
The
DistributedObjectCache(through it’sDistributedMapparent) defines a “put” method overload that accepts a TTL for the individual cache entry. If you want to set the TTL for the entire cache, there is conversely asetTimeToLive(int)method inDistributedMapsee http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.wsps.602.javadoc.doc/doc/com/ibm/websphere/cache/DistributedMap.html
Worth noting is that the TTL is not available as a configuration option in the cacheinstances.properties (or the admin console Resources/Cache Instances/Object cache instances), it has to be set programatically using
setTimeToLive()