I'm talking about not caching the Portlet class object - which is currently cached (incorrectly re: multiple portlets of the same type on the same page and re: id) now. It's cached for 45 minutes or something... But this make no sense to me!
The Portlet class cannot have instance variables. It's got to be thread safe. It will never change over time, so why keep it for 45 minutes? It must be a breeze to construct, since it can't do anything at construction! I'm sure that the caching code is more expensive than just creating it when we need it. On the other hand, if we can figure out a way to make it once and keep it forever, that would be easier on the gc. Then we should make sure that the PSML info and the Registry info and all the other little objects that we make to satisfy a request related to the portal page definition can all be held onto, also. I'll look at this while fixing the getID() / PortletConfig problems. Please, if you know of an expensive to create portlet class, let me know! And, btw, Portlet caching is not much like a servlet - which is really a singleton. Portlet class objects could be singletons, too. - Glenn > -----Original Message----- > From: Chris Kimpton [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 10, 2002 4:08 PM > To: Jetspeed Developers List > Subject: Re: Portlet caching - NOT > > > Hi, > > --- Glenn Golden <[EMAIL PROTECTED]> wrote: > > I propose that we stop attempting to cache a Portlet. I > can think of > > no reason why it would be a benefit. A Portlet cannot hold much in > > the way of > > instance variables, so it should not have any significant cost to > > construct. > > > > Not sure if I understand which caching your talking about (which is > why I have avoid commenting on your proposals in general - leave it > to others who do know). But if you mean the actual Portlet instance, > for example, like for example the VelocityPortlet, then isn't this > like a Servlet and they get cached. > > I have used this facility - although I could have structured my code > to use an independent cache, like the GlobalCache to avoid the > problem. > > So, my vote is -1 on removing this. > > Chris > > ===== > ------------------------------------------ > http://www.soccer2002.org.uk - The Game is On! > > __________________________________________________ > Do You Yahoo!? > Yahoo! Shopping - Mother's Day is May 12th! > http://shopping.yahoo.com > > -- > To unsubscribe, e-mail: > <mailto:jetspeed-dev-> [EMAIL PROTECTED]> > For > additional commands, > e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
