As posted on jcs-user, maybe it's more appropriate here.
-------- Original Message -------- Subject: Best Practice question on setting ElementAttributes Date: Fri, 21 Jul 2006 21:32:57 +0200 From: Thomas Vandahl <[EMAIL PROTECTED]> To: JCS Users List <[email protected]> Hi there, I'm working in the Torque and Turbine projects. I'm trying to improve some of the caching functions there (they are based on JCS, for those who don't know). For a better understanding of JCS' internals I wrote an implementation of the Turbine GlobalCacheService which uses JCS. There I stumbled across a problem that I would like to ask you about. In GlobalCacheService you create CachedObjects which have a certain lifetime. The life time can be defined for each object individually. I thought that setting ElementAttributes per object would be a good way to implement this. *However* when I request a copy of the ElementAttributes from my region, the create time is not updated, so that - as time passes - I happen to put objects into the cache which are expired immediately. I found that casting to the implementation ElementAttributes (not the interface) gives me access to the members of the object (Why are these public, anyway?), so that I can update the creationTime. But I'm feeling uncomfortable with this solution. How is the kosher way to solve this? Bye, Thomas. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
