I am a .Net developer who is starting to do more and more Java development at work. I have a specific question about caching that I hope you guys can solve or offer suggestions. We are starting a java project that will be deployed on a Linux box running JBoss. We are planning ahead and try to think about our caching strategy. One thing we would like to do is to output cache the pages since our content will likely be cacheable for 8 hours or so. I started looking at mod_cache and this does what we want to do. The one other requirement that I need to meet is that for every request, I need to do some custom logging. I need the basic request URL and then some other business logic stuff and stuff it into a database. My questions are these:
1) How can i put code at the mod_cache level to kick off the custom logging process?
2) I want to queue these logging messages up somehow since i don't want to go to the db with every request. What would be the best way to tackle this?
I would appreciate any suggestions or solutions if you got 'em!