Thoughts about caching with Struts Actions, Tiles and JSP
Talking to the database on each request is not necessary because the content of my weblog does not change very often (for now =) ). So I like the idea of using a cache. Whenever I add a new entry I could send a notification to the cache and the cache would be flushed. So far so good. The tricky thing now is that I am using Tiles and putting a cache taglib into the tile would have no effect because the correspondig Action, which talks to the database, would still get called. Therefore I need a cache logic before the Action gets called. Currently I think the best solution would be to write a special filter. The filter would cache a defined URL, e.g. http://woeye.highteq.net/weblog/show.do?author=woeye and flush the cache on special events. Perhaps I should take a look at OSCache from OpenSymphony?
Any ideas or suggestions?
Comments