From: Lars G. <la...@wo...> - 2004-05-25 05:43:37
|
Hi Lane, OK, I get it, that is an approach. That way I add my own CachingTool and use it where I need it. Getting the scope etc. supported should not be much more complicated I assume. The other question of course is if that would not be a good feature for WebMacro's core as well. In general the question is what is the way to go, using templets or blocks. Thanks, Lars Lane Sharman wrote: > Hi, > > With WM, you can have an object like $WMCache in the context. Then, as > you evaluate a templet into a string variable, you can place the string > variable into the $WMCache. The next time around, you can test for its > existence subject to a lot of criteria such as user, session, time, > invalidation, etc, etc. > > -Lane > > > > > Brian Goetz wrote: > >> You've addressed half of Lars' question -- the caching infrastructure >> -- but not the other half -- the integration of caching into the >> template language. The approach taken by OSCache is quite cool, in >> that allows JSP writers to specify the interaction of caching and >> content quite nicely. >> >> >>> Caching has been discussed a lot and there is a caching provider >>> interface so you can write your own caching implementation. (As I >>> have done). >>> >>> To cache individual objects, you can use a global service model to >>> cache individual templates (eg, connection.wmt, statements.wmt, etc.) >>> and objects (queryResultReference, queryResultDomain, >>> queryResultTransaction, etc). With this kind of a model, you cache >>> both the template elements and the results according to memory and >>> invalidation events. >>> |