[jboss-user] [JBoss Cache: Core Edition] - Cache modified time not updated in a clustered environment.

szkazmi do-not-reply at jboss.com
Thu Mar 27 14:09:33 EDT 2008


We are using jboss cache to save some key information in a session like object. Each object is stored under its own node and we have provided our own implementation of LRUInvalidationPolicy class which removes object from cache when evict is called (we are using 1.4.0SP1).

The cache region policy is set as given below

policyClass = "custom.LRUInvalidationPolicy"
maxNodes = 0
timeToLiveSeconds = 3600
maxAgeSeconds = 86400

In some cases we need to keep the session alive beyond the maximum timeToLiveSeconds. Hence we implemented a timer in client which retrieves the object from TreeCache with the expectation that LRU time stamp would be updated. Since we have the timeToLiveSeconds set to 60 minutes, we have this refresh timer running every 20 minutes to update the timestamp and keep the object in cache.

The problem is it that this does not work in clustered environment. In non-clustered environment, we can keep the object in cache as long as refresh timer is active. However in clustered environment the refresh timer has no impact and object is removed from cache in 60 minutes. 

Form what I can tell the LRU timestamp is not replicated across the cluster.  I have tested and verified this behavior in 1.4.1SP8 as well. What can we do to keep the session alive? Do we actually need to update the object itself to update its timestamp?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139427#4139427

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139427



More information about the jboss-user mailing list