Yes. Keys are URI/URLs, values are the contents of the generated file.
CacheMode would be LOCAL (or replicated or you want to replicate that cache), and you'd have to configure one of the CacheLoaders (e.g. BerkeleyDB).
Thanks for the reply. To expand, Is there a similar feature to OSCache like a tag libarary that will allow cache control on sections of a JSP? Or is the cache mechanism purely URL based?
Also is there anywhere in the docs or example code out there where someone has tried caching JSP (replicable) to disk? I saw a mention of a squid based application of JBOSS Cache in the FAQ but have not found any good examples of that type of configuration yet.
I don't know what oscache does, you need to ask them.
Wrt Squid: this is just an idea I had, there is no implementation. Yet ! ?
We have recreated the functionality of OScache's filter and taglib using JBoss cache as the back end. We also use spring to control quartz to deal with expiration, but I'm not sure if everyone would be happy with so many dependencies. You could swap the quartz & spring libs and use tasktimers instead.
If people are interested, we could look at opening the code...
So are filters implemented as eviction policies in JBossCache ?
I'm thinking where code like this would go, e.g. would the taglibs, cache filter and eviction policies go into Tomcat ?
As I understand it, the filter will cache all successfull HTTP_OK responses to a memory or disk cache for the web app that match a specified pattern. The tag lib allows caching of blocks within JSP pages. Tags also have expiry settings. Cache size and algorithm play factors there too i guess. There is a cron style approach to handle overall expiring etc. but I have not looked at that deeply enough yet myself.
we used spring to manage the cache, it can use simple or cron-style timers that evict content from the cache.
The filter and the taglib both try and populate the cache, but they will continue to serve the existing content if an exception is thrown when trying to update. The filter caches whole views and the taglib can be used for sections of a page.
We also use spring aop to provide method interception and can cache the results of methods in a declarative manner.
analogue boy, nchadwick
we are interested in getting this in the JBoss codebase. Bela will work with you guys.
Wow, that'd be excellent. I'll get a clean version together for you in the next couple of days.