In a JSP, it’s easy enough to implement a caching strategy, since there’s a wealth of cool caching taglibs that will help you out. But what about Struts apps?

In a struts app, all your database logic is accessed via the action (or more typically via a DAO type pattern in the action, but you get my gist). So, how do you implement caching in the action?

I guess you could roll your own by keeping a private Date field of the last time you did a lookup (even keep that in your base action class), but it’s not that clean.

I’ve heard good things about JCache - that it can help with this sort of stuff. So I’ll be having a look over the next week or so. Anyone else have any good pointers for this type of scenario?