Piero / Brett, As the author of OSCache - I think I can contribute here :) (I also heard that f2 uses it recently - great stuff Brett ;))
Caching in the model is fundamentally different to caching in the view. Caching in the model depends on your MVC framework. View tier caching is MUCH more useful if you're using WebWork because it is a pull MVC framework (therefore your view tier cache never pulls data, and hence you make a time saving). With Struts, view tier caching is useful to save things like iteration or method calls that are costly from within the JSP. However model caching is still important - but it should probably be done at a higher level than your Action class. The model tier itself should have some sort of caching built in IMHO - controllers shouldn't cache. My $0.02 Cheers, Mike ATLASSIAN - http://www.atlassian.com Expert J2EE Software, Services and Support ------------------------------------------------------- Need a simple, powerful way to track and manage issues? Try JIRA - http://www.atlassian.com/software/jira On 16/7/02 4:37 PM, "Brett Porter" ([EMAIL PROTECTED]) penned the words: > I would suggest, and have used very successfully, using some form of > object caching in the model. While I use a custom built cache for the > task, jakarta's commons-pool and commons-collections would provide most > of what you need to do this with. > > The extra part added to the caching scheme here is a time limit on the > object life. > > Does anyone have an opinion on whether this belongs in the model or the > controller? I find it should sit right along side the persistence/data > retrieval mechanisms in the model. > > Cheers, > Brett > > Piero Fraternali wrote: >> My question is: how do I use caching technologies like Open Symphony and >> Jesi, which insert caching directives in the page templates, when I use >> a MVC architecture, like Struts. >> In MVC the page templates operates on THE RESULTS OF THE DATABASE >> QUERIES, and DOES NOT PERFORM THE QUERIES. If I cache at the level of >> the scripting code or custom tags, it is too late, the queries have >> already been executed by the action in the Model. >> More generally, if the page template is complex, normally queries must >> be executed BEFORE rendering the HTML, in the due order. >> How does caching of page fragments cope with this? >> Thanx >> Piero Fraternali > > > _______________________________________________ > MVC-Programmers mailing list > [EMAIL PROTECTED] > http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers _______________________________________________ MVC-Programmers mailing list [EMAIL PROTECTED] http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers