Re: Caching of rendered panels

2009-03-28 Thread Igor Vaynberg
if you dont mind putting this into a wrapper there is a containertransformer or something like that. -igor On Sat, Mar 28, 2009 at 1:13 AM, Daniel Frisk wrote: > Great ideas! I think I will try to implement it is a WebComponent decorator > that can wrap a component and add the caching. I'll let

Re: Caching of rendered panels

2009-03-28 Thread Daniel Frisk
Great ideas! I think I will try to implement it is a WebComponent decorator that can wrap a component and add the caching. I'll let you know if it works out for me. // Daniel jalbum.net On 2009-03-27, at 20:40, Matej Knopp wrote: You have to be really brave to use IComponentSource :-) I

Re: Caching of rendered panels

2009-03-27 Thread Matej Knopp
You have to be really brave to use IComponentSource :-) It's almost never a good idea anyway. It makes sense if you have container with big amount of small component and you can restore the whole hierarchy from e.g. an entity Id. but it was last time used with Wicket 1.3. There's not guarantee it

Re: Caching of rendered panels

2009-03-27 Thread Igor Vaynberg
ive never had to do this, but maybe something like this will work :) class myheavypanel implements icomponentsource { private String cache; public Component restoreComponent(String id) { if (cache==null) { return this; } else { return new label(id, cache).setescapema

Re: Caching of rendered panels

2009-03-27 Thread Jeremy Thomerson
Even supposing that you don't already have some other cache engine built into your app somewhere, couldn't you build a simple caching model class much easier than caching rendered HTML. To cache the rendered HTML you must: 1 - on request one, create the component, render it, cache the rendered HT

Re: Caching of rendered panels

2009-03-27 Thread Daniel Frisk
In our case it's not really that the rendering itself is taking to long, it is getting the data from the model (database) so your advice is in some sense correct. Restructuring the code so that we can efficently cache the model is a lot of work and I would prefer to somehow cache the render

Re: Caching of rendered panels

2009-03-27 Thread Jeremy Thomerson
Don't share component instances across requests / especially sessions. Don't prematurely optimize. Cache your model and test the rendering. If it really is taking too long, figure out why and worry about it then. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Mar 27, 2009 at 1:12 P

Re: Caching of rendered panels

2009-03-27 Thread Martin Grotzke
Hi, I also thought about s.th. like this because we'll have very complex component graphs that have to be composed dynamically based on the language of the user and ~3 other things. I thought about caching complete component instances, but didn't come so far that I thought about how this could be

Re: Caching of rendered panels

2009-03-27 Thread Igor Vaynberg
normally you should cache your model, the rendering itself is very cheap. -igor On Fri, Mar 27, 2009 at 8:49 AM, Daniel Frisk wrote: > I have a situation where I have some panels which I want to render say at > most once a minute and during that period they should be "static". I tried a > few ap

Caching of rendered panels

2009-03-27 Thread Daniel Frisk
I have a situation where I have some panels which I want to render say at most once a minute and during that period they should be "static". I tried a few approches which hasn't really worked out for me so I wanted to know if somebody has created such a thing or how this could be done. Idea