Generally speaking (and this may not fit your situation), the expensive stuff is database access and related processing of data. Actually chucking it all onto an HTML page is relatively cheap. Without knowing specifics, I'm still fairly confident that you'd get more mileage out of simply caching your "Model" objects (create Model per page, and have the Tapestry page do nothing much more than suck data from the model. Some ForEach's, Inserts and possibly a few Conditionals will typically do it quite nicely). Then cache the models as appropriate - in the Visit if they're session specific, or in some other Application wide cache if they're not.
I'd wager this will give you less pain than creating your own Page subclass, and ends up with a slightly cleaner design to boot. Just my $0.02 Craig On Tue, 2002-11-05 at 04:08, [EMAIL PROTECTED] wrote: > > > Hello all, > > I would like to revisit the subject of integrating caching in > Tapestry. > > Last time I talked about this, the conclusion was that it's to > difficult to implement caching because of the very dynamic nature > of the framework. > > I'm about to develop an application that will need caching (this > app produce lots of binary content, charts, reports, it's > extremely database intensive and it will run in an already busy > server), and so I'm looking in the bowels of Tapestry to try to > implement cache, but I am way over my head and really need some > help with this. > > What I need is to cache the response output using the value of > certain variables as a key. > > Example: > > Let's say I have a datagrid (with paging) that shows results from > a database. In this case the response output depends only in a > single variable, the page number. So the cache key is the page > number, and whenever there is a request for the datagrid if the > page number exists in cache all the processing is skipped and the > cached response will be presented to the user. > > > > My first take at the problem was to subclass AbstractPage and > create a CachePage (similar to BasePage) and work from here, > but I'm having no success, it seems that I have to tackle this > somewhere above in the page life cycle, but I don't know where. > > Suggestions to solve this problem are most appreciated. > > > Best regards, > > Luis Neves > > > ------------------------------------------------------- > This SF.net email is sponsored by: ApacheCon, November 18-21 in > Las Vegas (supported by COMDEX), the only Apache event to be > fully supported by the ASF. http://www.apachecon.com > _______________________________________________ > Tapestry-developer mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/tapestry-developer ------------------------------------------------------- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
