ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Memoization in Java Using Dynamic Proxy Classes
Subject:   AOP...
Date:   2003-08-21 11:01:29
From:   crazybob
I've successfully employed this same solution in the past. One suggestion, if you implement this using a dynamic proxy based AOP framework (Nanning for example), you have less code to maintain, and you can easily limit the caching to certain methods. You could limit it to methods following a certain naming convention (i.e., "get*"), or you could use XDoclet-like attributes and cache any method with an "@idempotent" attribute.

1 to 1 of 1
1 to 1 of 1