Agree - i was trying this out a while ago and the only problem i ran into was that you have to make sure the key you generate are unique and not to slow to generate ... It is fine with strings and the natives, but when you run into trying to cache requests based on more complex objects, the key generation becomes a little trickier (what values to use, cause toString for example could be to slow, or return bad keys) ... But nevertheless an interesting topic :)

Johan

On Mon, 28 Mar 2005 03:35:29 -0500, James Carman <[EMAIL PROTECTED]> wrote:

It's definitely doable using service interceptors in HiveMind. I assume you
have a way to key the cache, based upon the parameters passed to the method
invocation. You would also have to have a way to identify which method
invocations' return values you want cached. You could either do that
programmatically (maybe using a JDK5 annotation) or via a configuration
point. Sounds interesting.


-----Original Message-----
From: Michael [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 3:26 AM
To: [email protected]
Subject: Using Interceptors to implement transparent cache


I've used Pico & AOP so I am really interested in HiveMind's use of
interceptors. I'm currently thinking of a way to implementing caching in a
system without a database. An AOP approach seems straightforward but if I
can use HiveMind's interceptors it seems I may be able to avoid AOP. I'm
curious if anyone has any experience with this, or if anyone has any ideas?
My idea is to add an interceptor to look in the cache for an object and if
it's there, return the object and if not then continue with the service's
method and then at the end put the object in the cache so it's available the
next time.


Regards,
Michael



--
This E-mail is confidential. It may also be legally privileged. If you are
not the addressee you may not copy, forward, disclose or use any part of it.
If you have received this message in error, please delete it and all copies
from your system and notify the sender immediately by return E-mail.
Internet communications cannot be guaranteed to be timely, secure, error or
virus-free. The sender does not accept liability for any errors or
omissions.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-- you too?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to