Re: OSCache with lots of Tiles fragments

Julien Dubois <[email protected]>
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <[email protected]>
Hi everyone,

First of all, thanx to Hani and Bjorn for their help.

I started using OSCache + Tiles today, and it worked very well in the 
end. But I came across a little problem, I thought some of you might be 
interested by this experience.

If you use a <tiles:insert/> tag, you will get a "Illegal to flush 
within a custom tag" exception from the servlet container.
This is because when you insert a Tiles fragment, the output stream is 
flushed automatically by Tiles. It is forbidden by the JSP spec to nest 
a custom tag that is flushing the output stream, inside another custom tag.

The solution is to use the flush="false" attribute with the 
<tiles:insert/> tag.

I understand this is a Tiles-related problem, but I think this could be 
useful in the FAQ, if you want I can write it and send a patched version.

Julien Dubois.

Hani Suleiman wrote:
> Oops, sent to wrong list. Bad Sunday.
> 
> Begin forwarded message:
> 
>> From: Hani Suleiman <[email protected]>
>> Date: April 4, 2004 4:21:58 PM GMT+01:00
>> To: [email protected]
>> Subject: [Opensymphony-sitemesh] Re: [Opensymphony-oscache] OSCache 
>> with lots of Tiles fragments
>>
>> Yes, as long as your pages end up spitting out content of some sort, 
>> oscache is a perfect fit.
>>
>> OSCache doesn't know about tiles nor does it care, all it'll deal with 
>> is the result of whatever tiles does.
>>
>> It's hard to beat oscache's performance (trust me, it's very very 
>> fast). Of course if people abuse it (eg, Clinton Begin's very bizarre 
>> usage of oscache to cache db entities) then they only have themselves 
>> to blame!
>>
>> While there's no reason oscache wouldn't work for any/all sorts of 
>> caching, that really isn't the primary goal of it. The main purpose is 
>> for web site caching, for it to be as close to the front as possible.
>>
>> What you want to do is very very standard usage for oscache, so almost 
>> everyone who uses it does it for the exact same situation you're in, 
>> so yes, I'd say there are plenty of people who have done what you 
>> intend to. Examples are jroller.com (uses oscache over velocity 
>> templates), and javablogs.com (oscache over sitemesh jsp pages).
>>
>> On Apr 4, 2004, at 4:14 PM, Julien Dubois wrote:
>>
>>> Hi,
>>>
>>> I'm currently investigating OSCache for my next app.
>>> It will have between 3000 and 6000 users, using it all day long (I'd 
>>> say one click every 5 minutes in average).
>>> It will have a main layout, containing about 12 Tiles JSP fragments.
>>> The data for each Tile is very complex, but will not change often.
>>> I plan to cache the whole thing, as I will have about 20 kinds of 
>>> users (so that's 20 entries in my cache), and make it reload every hour.
>>> I'm a bit concerned by a recent entry on Matt Raible's weblog, it 
>>> seems Clinton Begin said OSCache was a dawn slow caching mechanism...
>>> So...
>>> 1. Does anybody have some experience with this kind of architecture?
>>> 2. Does OSCache play well with Tiles?
>>> 3. Is OSCache really under-performant?? For my app, it will not have 
>>> a lot of entries, but it will have lots of requests.
>>>
>>> If I do end up with using OSCache, you will of course see more of me 
>>> on this mailing list. But next time I hope I'll be the one answering 
>>> questions :-)
>>>
>>> Julien Dubois.
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> 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_id=1470&alloc_id=3638&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_id=1470&alloc_id=3638&op=click
>> _______________________________________________
>> Opensymphony-sitemesh mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/opensymphony-sitemesh
>>
> 
> 
> 
> -------------------------------------------------------
> 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_id=1470&alloc_id=3638&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_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.