RE: OSCache and MVC
"Francois Beauregard" <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <[email protected]> |
The needs (therefore the strategy) for caching varies a lot from application to application. The usual strategy I have used with a lot of success for web applications is to have caching in the persistence tier (ie Hibernate, Entity beans) and caching page fragments using oscache. This is very simple, and gives amazing performance. The way I do it is first; no caching. Then based on an analysis of the caracteristics of the site, use oscache to cache fragments of page. Then analyze queries to the db and activate caching in the persistence tier. I like to do the front end first because if you do it the reverse order, you might end up doing some useless caching in the persistence tier ___________________________ Francois Beauregard, b.ing. Vice-president Recherche et developpement Pyxis Technologies www.pyxis-tech.com T : (450) 681-9094, poste 102 F : (450) 681-5758 [email protected] On Mar 17, 2004, at 6:44 PM, Andreas Joseph Krogh wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > (Why can't people start their reply _below_...) > > You forget that OSCache also comes with an API which is perfectly > suited for > caching objects generated by f.ex. EJBs. Only OSCache's /taglibs/ are > suited > for JSPs. Have your STRUTS-actions check the cache first, then stuff > the > returned object in session/request or whatever, if it's not found in > the > cache, call your EJBs in the NeedsRefreshException-block and stuff the > result > in OSCache's cache so that subsequent calls will use the cached > object. Works > like a charm, do it all the time. > > On Wednesday 17 March 2004 23:41, Mike Cannon-Brookes wrote: >> Nicolas, >> >> No, OSCache JSP tags only cache the presentation tier (or view), which >> is executed after your controller. You would need to implement your >> own >> custom caching in the controller for your scenario. >> >> Cheers, >> Mike >> >> -- >> ATLASSIAN - http://www.atlassian.com/ >> >> Confluence - the professional J2EE wiki - tried it yet? >> http://www.atlassian.com/confluence/ >> >> On 18/03/2004, at 6:14 AM, Fournier Nicolas wrote: >>> Hi. >>> >>> I am currently evaluating OSCache as a web tier caching solution. We >>> are >>> planning to use Struts as a framework to build the application on. >>> Being >>> new to OSCache, I am digging to find out how OSCache can be as >>> powerful >>> as possible. So my question is, how can Struts be integrated with >>> OSCache? >>> >>> More clearly, we plan that our bottleneck will be two things: page >>> construction and ejb calls. Because of how struts work (I guess most >>> MVC), the ejb calls are done before any jsp execution. Is it possible >>> that when page construction is cached, that the ejb calls associated >>> with it would not be executed ? >>> >>> Both are the same question, the second being just a clatrified >>> version. >>> Hope it is :-) >>> >>> Nicolas Fournier. > > - -- > Andreas Joseph Krogh <[email protected]> > Managing Director, Senior Software Developer > OfficeNet AS > > I always do a CVS update before making a patch (unless I forget). > > gpg public_key: http://dev.officenet.no/~andreak/public_key.asc > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.2 (GNU/Linux) > > iD8DBQFAWOL8UopImDh2gfQRAgtDAJ4iF6HfYlDqicx4mc4KYUhPbvBj6wCdEyDx > 9ufe49tlmCzpkttOiiGNNCU= > =8dWT > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click > _______________________________________________ > Opensymphony-oscache mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensymphony-oscache > ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick _______________________________________________ Opensymphony-oscache mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensymphony-oscache ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click